diff options
author | Christian Hesse <mail@eworm.de> | 2022-09-15 22:01:08 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2022-09-15 22:25:59 +0200 |
commit | c33e813f20839cb3bc0f56003ca5336229bfa430 (patch) | |
tree | af499013114bddbd0f4062720ab900d4d5946b3f /mod/notification-matrix | |
parent | 47e4f292cba0059f55eb7e3aec1ca0d237ecf4b3 (diff) |
mod/notification-matrix: $FlushMatrixQueue: use $0 for scheduler name
Diffstat (limited to 'mod/notification-matrix')
-rw-r--r-- | mod/notification-matrix | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mod/notification-matrix b/mod/notification-matrix index c4dd27b..5a5f8cf 100644 --- a/mod/notification-matrix +++ b/mod/notification-matrix @@ -24,7 +24,7 @@ :local AllDone true; :local QueueLen [ :len $MatrixQueue ]; - :if ([ :len [ /system/scheduler/find where name="FlushMatrixQueue" ] ] > 0 && $QueueLen = 0) do={ + :if ([ :len [ /system/scheduler/find where name=$0 ] ] > 0 && $QueueLen = 0) do={ $LogPrintExit2 warning $0 ("Flushing Matrix messages from scheduler, but queue is empty.") false; } @@ -46,7 +46,7 @@ } :if ($AllDone = true && $QueueLen = [ :len $MatrixQueue ]) do={ - /system/scheduler/remove [ find where name="FlushMatrixQueue" ]; + /system/scheduler/remove [ find where name=$0 ]; :set MatrixQueue; } } @@ -139,8 +139,8 @@ :set ($MatrixQueue->[ :len $MatrixQueue ]) { room=$Room; \ accesstoken=$AccessToken; homeserver=$HomeServer; \ plain=$Plain; formatted=$Formatted }; - :if ([ :len [ /system/scheduler/find where name="FlushMatrixQueue" ] ] = 0) do={ - /system/scheduler/add name=FlushMatrixQueue interval=1m start-time=startup \ + :if ([ :len [ /system/scheduler/find where name="\$FlushMatrixQueue" ] ] = 0) do={ + /system/scheduler/add name="\$FlushMatrixQueue" interval=1m start-time=startup \ on-event=(":global FlushMatrixQueue; \$FlushMatrixQueue;"); } } |