mod/notification-matrix: introduce $PurgeMatrixQueue

... to purge the queue and remove the scheduler.
This commit is contained in:
Christian Hesse 2023-08-06 16:25:52 +02:00
parent 9a5d55da0d
commit 0aeb34e5e9
2 changed files with 14 additions and 0 deletions

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
--------

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;