sms-forward: pass phone number and message to hook

These are available as $Phone and $Message in hook.
This commit is contained in:
Christian Hesse 2023-10-11 10:03:48 +02:00
parent f6e65dd68c
commit 5fbf584d4c
2 changed files with 4 additions and 2 deletions

View file

@ -58,7 +58,8 @@ $WaitFullyConnected;
$LogPrintExit2 info $0 ("Running hook '" . $Hook->"match" . "': " . \
$Hook->"command") false;
:do {
[ :parse ($Hook->"command") ];
:local Command [ :parse ($Hook->"command") ];
$Command Phone=$Phone Message=($SmsVal->"message");
:set Messages ($Messages . "\n\nRan hook '" . $Hook->"match" . "':\n" . \
$Hook->"command");
} on-error={