mod/notification-matrix: introduce $PurgeMatrixQueue

... to purge the queue and remove the scheduler.
This commit is contained in:
Christian Hesse
2023-08-06 16:35:51 +02:00
parent 9a5d55da0d
commit 0aeb34e5e9
2 changed files with 14 additions and 0 deletions
+5
View File
@@ -110,6 +110,11 @@ Place this before you call them:
:global SendMatrix;
:global SendNotification;
In case there is a situation when the queue needs to be purged there is a
function available:
$PurgeMatrixQueue;
See also
--------
+9
View File
@@ -9,6 +9,7 @@
:global FlushMatrixQueue;
:global NotificationFunctions;
:global PurgeMatrixQueue;
:global SendMatrix;
:global SendMatrix2;
@@ -151,6 +152,14 @@
}
}
# purge the Matrix queue
:set PurgeMatrixQueue do={
:global MatrixQueue;
/system/scheduler/remove [ find where name="\$FlushMatrixQueue" ];
:set MatrixQueue;
}
# send notification via Matrix - expects at least two string arguments
:set SendMatrix do={
:global SendMatrix2;