mod/notification-telegram: $FlushTelegramQueue: check for cert, again

Chances are that messages have been queued before system was fully up or
connected. Thus the certificate may be missing, and it should be checked
again for on flush.
This commit is contained in:
Christian Hesse 2025-10-13 12:06:01 +02:00
parent c81618b571
commit 6630d35eea

View file

@ -21,6 +21,7 @@
:global TelegramQueue; :global TelegramQueue;
:global TelegramMessageIDs; :global TelegramMessageIDs;
:global CertificateAvailable;
:global IsFullyConnected; :global IsFullyConnected;
:global LogPrint; :global LogPrint;
@ -29,6 +30,11 @@
:return false; :return false;
} }
:if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" ] = false) do={
$LogPrint warning $0 ("Downloading required certificate failed.");
:return false;
}
:local AllDone true; :local AllDone true;
:local QueueLen [ :len $TelegramQueue ]; :local QueueLen [ :len $TelegramQueue ];