diff options
author | Christian Hesse <mail@eworm.de> | 2024-12-09 09:13:18 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-12-09 11:49:50 +0100 |
commit | 519cb85e28e52c476ecb210e1ed201f64190f898 (patch) | |
tree | 0f64567c8631c4569c1ea62409f1f991b3039bc6 /mod/notification-telegram.rsc | |
parent | e51191035b21c529efb4387dfe59976c3112f561 (diff) | |
parent | 210ef26b93364f4b69cde9ff34139d51572357ee (diff) |
Merge branch 'func-exit-error' into next
Diffstat (limited to 'mod/notification-telegram.rsc')
-rw-r--r-- | mod/notification-telegram.rsc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/mod/notification-telegram.rsc b/mod/notification-telegram.rsc index 671bd1c..7d75b8b 100644 --- a/mod/notification-telegram.rsc +++ b/mod/notification-telegram.rsc @@ -15,7 +15,7 @@ :global SendTelegram2; # flush telegram queue -:set FlushTelegramQueue do={ +:set FlushTelegramQueue do={ :do { :global TelegramQueue; :global TelegramMessageIDs; @@ -56,7 +56,9 @@ /system/scheduler/remove [ find where name="_FlushTelegramQueue" ]; :set TelegramQueue; } -} +} on-error={ + :global ExitError; $ExitError false $0; +} } # send notification via telegram - expects one array argument :set ($NotificationFunctions->"telegram") do={ @@ -180,11 +182,13 @@ } # send notification via telegram - expects at least two string arguments -:set SendTelegram do={ +:set SendTelegram do={ :do { :global SendTelegram2; $SendTelegram2 ({ origin=$0; subject=$1; message=$2; link=$3; silent=$4 }); -} +} on-error={ + :global ExitError; $ExitError false $0; +} } # send notification via telegram - expects one array argument :set SendTelegram2 do={ |