aboutsummaryrefslogtreecommitdiffstats
path: root/sms-forward.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-10-11 10:03:48 +0200
committerGravatar Christian Hesse <mail@eworm.de>2023-10-17 14:05:03 +0200
commit5fbf584d4ca128e5acfd0424ec66e2edc24dd946 (patch)
treeb88e4dc398b2d79d855e01ef52cbd17c42b2733a /sms-forward.rsc
parentf6e65dd68c20d951564e3a52475522a83c2f9a3d (diff)
sms-forward: pass phone number and message to hook
These are available as $Phone and $Message in hook.
Diffstat (limited to 'sms-forward.rsc')
-rw-r--r--sms-forward.rsc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sms-forward.rsc b/sms-forward.rsc
index 7c6a609..4f2d2e6 100644
--- a/sms-forward.rsc
+++ b/sms-forward.rsc
@@ -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={