sms-forward: fix array access in condition

This commit is contained in:
Christian Hesse 2019-08-05 10:32:19 +02:00
parent 67f4b135f5
commit 5408ba008a

View file

@ -25,7 +25,8 @@
:foreach Sms in=[ / tool sms inbox find where phone=$Phone ] do={
:local SmsVal [ / tool sms inbox get $Sms ];
:if ($Phone = $Settings->"allowed" && ($SmsVal->"message")~("^:cmd " . $Settings->"secret" . " script ")) do={
:if ($Phone = $Settings->"allowed-number" && \
($SmsVal->"message")~("^:cmd " . $Settings->"secret" . " script ")) do={
:log debug "Removing SMS, which started a script.";
/ tool sms inbox remove $Sms;
} else={