diff options
Diffstat (limited to 'sms-forward')
-rw-r--r-- | sms-forward | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sms-forward b/sms-forward index bd1f9d6..28d60a1 100644 --- a/sms-forward +++ b/sms-forward @@ -8,6 +8,7 @@ :global Identity; +:global IfThenElse; :global LogPrintExit; :global MailServerIsUp; :global ScriptLock; @@ -50,9 +51,10 @@ $WaitFullyConnected; } :if ([ :len $Messages ] > 0) do={ + :local Count [ :len $Delete ]; $SendNotification ([ $SymbolForNotification "incoming-envelope" ] . "SMS Forwarding from " . $Phone) \ - ("These message(s) were received by " . $Identity . \ - " from " . $Phone . ":" . $Messages); + ("Received " . [ $IfThenElse ($Count = 1) "this message" ("these " . $Count . " messages") ] . \ + " by " . $Identity . " from " . $Phone . ":" . $Messages); :foreach Sms in=$Delete do={ / tool sms inbox remove $Sms; } |