mod/notification-telegram: only flush queue if fully connected

The fetch command is not as reliable as it should be... Chances were that
notifications were sent multiple times if stuck in background.
Let's flush only if fully connected - and hope this fixes it.
This commit is contained in:
Christian Hesse 2022-06-17 00:57:11 +02:00
parent cf59e7c1a2
commit 8b6f830fe8

View file

@ -12,8 +12,14 @@
:set FlushTelegramQueue do={
:global TelegramQueue;
:global IsFullyConnected;
:global LogPrintExit2;
:if ([ $IsFullyConnected ] = false) do={
$LogPrintExit2 debug $0 ("System is not fully connected, not flushing.") false;
:return false;
}
:local AllDone true;
:local QueueLen [ :len $TelegramQueue ];