sms-forward: use $SendNotification2

This commit is contained in:
Christian Hesse 2021-04-27 20:46:58 +02:00
parent 557016387c
commit 123fe01115

View file

@ -15,7 +15,7 @@
:global IfThenElse;
:global LogPrintExit2;
:global ScriptLock;
:global SendNotification;
:global SendNotification2;
:global SymbolForNotification;
:global WaitFullyConnected;
@ -51,9 +51,9 @@ $WaitFullyConnected;
:if ([ :len $Messages ] > 0) do={
:local Count [ :len $Delete ];
$SendNotification ([ $SymbolForNotification "incoming-envelope" ] . "SMS Forwarding from " . $Phone) \
("Received " . [ $IfThenElse ($Count = 1) "this message" ("these " . $Count . " messages") ] . \
" by " . $Identity . " from " . $Phone . ":" . $Messages);
$SendNotification2 ({ subject=([ $SymbolForNotification "incoming-envelope" ] . "SMS Forwarding from " . $Phone); \
message=("Received " . [ $IfThenElse ($Count = 1) "this message" ("these " . $Count . " messages") ] . \
" by " . $Identity . " from " . $Phone . ":" . $Messages) });
:foreach Sms in=$Delete do={
/ tool sms inbox remove $Sms;
}