aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-10-19 13:45:02 +0200
committerGravatar Christian Hesse <mail@eworm.de>2020-10-19 13:49:57 +0200
commit4af1f5dec2cb8c7b94b3fff141cab63b2adae725 (patch)
tree1c915bda17ce0d8047260d3e3baa5fdd2b72c600
parent4a85deb45c5f6a0231180e57ade1c2d600262f4b (diff)
sms-forward: improve wording for single/multiple message(s)
-rw-r--r--sms-forward6
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;
}