From d865deb8a8710d98453adf221e72fdfd0a71dc33 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 6 May 2025 09:45:14 +0200 Subject: [PATCH] mod/notification-matrix: use :onerror for outer block --- mod/notification-matrix.rsc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mod/notification-matrix.rsc b/mod/notification-matrix.rsc index e989ee0..c8cf887 100644 --- a/mod/notification-matrix.rsc +++ b/mod/notification-matrix.rsc @@ -19,7 +19,7 @@ :global SetupMatrixJoinRoom; # flush Matrix queue -:set FlushMatrixQueue do={ :do { +:set FlushMatrixQueue do={ :onerror Err { :global MatrixQueue; :global IsFullyConnected; @@ -58,8 +58,8 @@ /system/scheduler/remove [ find where name="_FlushMatrixQueue" ]; :set MatrixQueue; } -} on-error={ - :global ExitError; $ExitError false $0; +} do={ + :global ExitError; $ExitError false $0 $Err; } } # send notification via Matrix - expects one array argument @@ -167,12 +167,12 @@ } # send notification via Matrix - expects at least two string arguments -:set SendMatrix do={ :do { +:set SendMatrix do={ :onerror Err { :global SendMatrix2; $SendMatrix2 ({ origin=$0; subject=$1; message=$2; link=$3 }); -} on-error={ - :global ExitError; $ExitError false $0; +} do={ + :global ExitError; $ExitError false $0 $Err; } } # send notification via Matrix - expects one array argument