From d193fd99a48d06319db36247641b23255d6a4455 Mon Sep 17 00:00:00 2001 From: vados-dev <192440777+vados-dev@users.noreply.github.com> Date: Fri, 1 May 2026 00:55:03 +0300 Subject: [PATCH] Autocommit in repo: ros.vados.ru, generated by owner: root, in 00:55:02 01.05.2026. --- html/AM-GlobalFunc.rsc | 4 ++-- html/mod/AM-TG-Bot.rsc | 6 ++++-- html/mod/AM-TG-Bot.rsc.diff | 25 +++++++------------------ 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/html/AM-GlobalFunc.rsc b/html/AM-GlobalFunc.rsc index 3ea755003..ab53a4cca 100644 --- a/html/AM-GlobalFunc.rsc +++ b/html/AM-GlobalFunc.rsc @@ -17,9 +17,9 @@ :global GlobalFuncReady false; # Git commit id & info, expected configuration version -:global CommitId "main/322/e01f85b4"; +:global CommitId "main/323/5941eae8"; :global CommitTAG "unknown"; -:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 00:50:02 01.05.2026."; +:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 00:55:02 01.05.2026."; # The variables are received right here. :global GlobalConfVersion 138; diff --git a/html/mod/AM-TG-Bot.rsc b/html/mod/AM-TG-Bot.rsc index 7e4d92210..ebc741627 100644 --- a/html/mod/AM-TG-Bot.rsc +++ b/html/mod/AM-TG-Bot.rsc @@ -49,6 +49,8 @@ :error false; } + $WaitFullyConnected; + :if ([ :len [ /system/scheduler/find where name=$ScriptName ] ] = 0) do={ /system/scheduler/add start-time=startup interval=30s name=$ScriptName on-event="/system/script/run $ScriptName;" comment="Telegram Chat Bot"; } @@ -71,9 +73,9 @@ :for I from=1 to=4 do={ :if ($Data = false) do={ :onerror Err { - :set Data ([ /tool/fetch check-certificate=yes-without-crl \ + :set Data ([ /tool/fetch check-certificate=yes-without-crl output=user \ ("https://api.telegram.org/bot" . $TelegramTokenId . "/getUpdates?offset=" . \ - $TelegramChatOffset->0 . "&allowed_updates=%5B%22message%22%5D") output=user as-value ]->"data"); + $TelegramChatOffset->0 . "&allowed_updates=%5B%22message%22%5D") as-value ]->"data"); :set TelegramRandomDelay [ $MAX 0 ($TelegramRandomDelay - 1) ]; } do={ :if ($I < 4) do={ diff --git a/html/mod/AM-TG-Bot.rsc.diff b/html/mod/AM-TG-Bot.rsc.diff index 590f6bb16..29730d982 100644 --- a/html/mod/AM-TG-Bot.rsc.diff +++ b/html/mod/AM-TG-Bot.rsc.diff @@ -20,31 +20,20 @@ --- > :global GlobalConfigReady; :global GlobalFunctionsReady; > :retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \ -44a48 -> :global WaitFullyConnected; -51,53c55 +54,57d56 < :if ([ :len [ /system/scheduler/find where name=$ScriptName ] ] = 0) do={ < /system/scheduler/add start-time=startup interval=30s name=$ScriptName on-event="/system/script/run $ScriptName;" comment="Telegram Chat Bot"; < } ---- -> $WaitFullyConnected; -68a71 +< +71a71 > -73c76 -< :set Data ([ /tool/fetch check-certificate=yes-without-crl \ ---- -> :set Data ([ /tool/fetch check-certificate=yes-without-crl output=user \ -75c78 -< $TelegramChatOffset->0 . "&allowed_updates=%5B%22message%22%5D") output=user as-value ]->"data"); ---- -> $TelegramChatOffset->0 . "&allowed_updates=%5B%22message%22%5D") as-value ]->"data"); -85a89 +88a89 > -107a112 +110a112 > -114a120 +117a120 > -183c189,191 +186c189,191 < } else={$LogPrint info $ScriptName $MessageText} --- > } else={ -- 2.52.0