aboutsummaryrefslogtreecommitdiffstats
path: root/mod/notification-ntfy.rsc
diff options
context:
space:
mode:
Diffstat (limited to 'mod/notification-ntfy.rsc')
-rw-r--r--mod/notification-ntfy.rsc12
1 files changed, 8 insertions, 4 deletions
diff --git a/mod/notification-ntfy.rsc b/mod/notification-ntfy.rsc
index b2bb280..7e0234b 100644
--- a/mod/notification-ntfy.rsc
+++ b/mod/notification-ntfy.rsc
@@ -15,7 +15,7 @@
:global SendNtfy2;
# flush ntfy queue
-:set FlushNtfyQueue do={
+:set FlushNtfyQueue do={ :do {
:global NtfyQueue;
:global NtfyMessageIDs;
@@ -52,7 +52,9 @@
/system/scheduler/remove [ find where name="_FlushNtfyQueue" ];
:set NtfyQueue;
}
-}
+} on-error={
+ :global ExitError; $ExitError false $0;
+} }
# send notification via ntfy - expects one array argument
:set ($NotificationFunctions->"ntfy") do={
@@ -132,11 +134,13 @@
}
# send notification via ntfy - expects at least two string arguments
-:set SendNtfy do={
+:set SendNtfy do={ :do {
:global SendNtfy2;
$SendNtfy2 ({ origin=$0; subject=$1; message=$2; link=$3; silent=$4 });
-}
+} on-error={
+ :global ExitError; $ExitError false $0;
+} }
# send notification via ntfy - expects one array argument
:set SendNtfy2 do={