diff options
author | Christian Hesse <mail@eworm.de> | 2020-10-19 13:45:02 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2020-10-19 13:49:57 +0200 |
commit | 4af1f5dec2cb8c7b94b3fff141cab63b2adae725 (patch) | |
tree | 1c915bda17ce0d8047260d3e3baa5fdd2b72c600 /sms-forward | |
parent | 4a85deb45c5f6a0231180e57ade1c2d600262f4b (diff) |
sms-forward: improve wording for single/multiple message(s)
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; } |