From: vados-dev <192440777+vados-dev@users.noreply.github.com> Date: Thu, 30 Apr 2026 21:15:03 +0000 (+0300) Subject: Autocommit in repo: ros.vados.ru, generated by owner: root, in 00:15:02 01.05.2026. X-Git-Url: https://git.vados.ru/gitweb.cgi?a=commitdiff_plain;h=a9611f32af703535a470b00c5b54d3135d38b7db;p=Mikrotiks%2Fros.vados.ru.git Autocommit in repo: ros.vados.ru, generated by owner: root, in 00:15:02 01.05.2026. --- diff --git a/html/AM-GlobalFunc.rsc b/html/AM-GlobalFunc.rsc index a4b960d30..16dc1f461 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/314/b8ef8d13"; +:global CommitId "main/315/84d64b90"; :global CommitTAG "unknown"; -:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 00:10:03 01.05.2026."; +:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 00:15:02 01.05.2026."; # The variables are received right here. :global GlobalConfVersion 138; diff --git a/html/mod/.#AM-TG-Notifications.rsc b/html/mod/.#notification-telegram.rsc similarity index 100% rename from html/mod/.#AM-TG-Notifications.rsc rename to html/mod/.#notification-telegram.rsc diff --git a/html/mod/AM-TG-Notifications.rsc b/html/mod/AM-TG-Notifications.rsc index a1ab5e227..951c7f121 100644 --- a/html/mod/AM-TG-Notifications.rsc +++ b/html/mod/AM-TG-Notifications.rsc @@ -27,11 +27,11 @@ :global CertificateAvailable; :global IsFullyConnected; :global LogPrint; - - #:if ([ $IsFullyConnected ] = false) do={ - # $LogPrint debug $0 ("System is not fully connected, not flushing."); - # :return false; - #} + + :if ([ $IsFullyConnected ] = false) do={ + $LogPrint debug $0 ("System is not fully connected, not flushing."); + :return false; + } :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" "fetch" ] = false) do={ $LogPrint warning $0 ("Downloading required certificate failed."); :return false; @@ -60,17 +60,19 @@ /system/scheduler/remove [ find where name="_FlushTelegramQueue" ]; :set TelegramQueue; } -} do={:global ExitOnError; $ExitOnError $0 $Err} -} +} do={ +:global ExitOnError; $ExitOnError $0 $Err; +} } + # get the chat id :set GetTelegramChatId do={ :onerror Err { :global TelegramTokenId; -# :global CertificateAvailable; + :global CertificateAvailable; :global LogPrint; -# :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" "fetch" ] = false) do={ -# $LogPrint warning $0 ("Downloading required certificate failed."); -# :return false; -# } + :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" "fetch" ] = false) do={ + $LogPrint warning $0 ("Downloading required certificate failed."); + :return false; + } :local Data; :onerror Err { :set Data ([ /tool/fetch check-certificate=yes-without-crl output=user \ @@ -91,8 +93,10 @@ :if (($Message->"is_topic_message") = true) do={ $LogPrint info $0 ("The thread id is: " . ($Message->"message_thread_id")); } -} do={:global ExitOnError; $ExitOnError $0 $Err} -} +} do={ +:global ExitOnError; $ExitOnError $0 $Err; +} } + # send notification via telegram - expects one array argument :set ($NotificationFunctions->"telegram") do={ :local Notification $1; diff --git a/html/mod/AM-TG-Notifications.rsc.diff b/html/mod/AM-TG-Notifications.rsc.diff index 2e31baf10..4e8667d8e 100644 --- a/html/mod/AM-TG-Notifications.rsc.diff +++ b/html/mod/AM-TG-Notifications.rsc.diff @@ -22,18 +22,7 @@ > # https://rsc.eworm.de/doc/mod/notification-telegram.md 26a23 > -30,34c27,32 -< -< #:if ([ $IsFullyConnected ] = false) do={ -< # $LogPrint debug $0 ("System is not fully connected, not flushing."); -< # :return false; -< #} ---- -> -> :if ([ $IsFullyConnected ] = false) do={ -> $LogPrint debug $0 ("System is not fully connected, not flushing."); -> :return false; -> } +34a32 > 41a40 > @@ -41,56 +30,39 @@ > 58a59 > -63,64c64,67 -< } do={:global ExitOnError; $ExitOnError $0 $Err} -< } +64c65 +< :global ExitOnError; $ExitOnError $0 $Err; --- -> } do={ > :global ExitOnError; $ExitOnError $0 $Err; -> } } +69a71 > -68c71,72 -< # :global CertificateAvailable; ---- -> -> :global CertificateAvailable; -70,73c74,79 -< # :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" "fetch" ] = false) do={ -< # $LogPrint warning $0 ("Downloading required certificate failed."); -< # :return false; -< # } ---- +71a74 > -> :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" "fetch" ] = false) do={ -> $LogPrint warning $0 ("Downloading required certificate failed."); -> :return false; -> } +75a79 > -82a89 +84a89 > -84a92 +86a92 > -88a97 +90a97 > -94,95c103,106 -< } do={:global ExitOnError; $ExitOnError $0 $Err} -< } +97,98c104,105 +< :global ExitOnError; $ExitOnError $0 $Err; +< } } --- -> } do={ > :global ExitOnError; $ExitOnError $0 $Err; > } } +102a110 > -98a110 -> -108a121 +112a121 > -116a130 +120a130 > -120a135 +124a135 > -122a138 +126a138 > -133c149,153 +137c149,153 < :if ($Mode = "body") do={:return ("```\n" . $Text . "\n```")} --- > @@ -98,9 +70,9 @@ > :return ("```\n" . $Text . "\n```"); > } > -135a156 +139a156 > -142,143c163,171 +146,147c163,171 < :if ([ :len $TokenId ] = 0 || [ :len $ChatId ] = 0) do={:return false} < :if ([ :typeof $TelegramMessageIDs ] = "nothing") do={:set TelegramMessageIDs ({})} --- @@ -113,30 +85,30 @@ > :set TelegramMessageIDs ({}); > } > -154c182,184 +158c182,184 < } else={:set Text ($Text . [ $EscapeMD ($Notification->"message") "body" ])} --- > } else={ > :set Text ($Text . [ $EscapeMD ($Notification->"message") "body" ]); > } -164a195 +168a195 > -179c210,213 +183c210,213 < :if ([ :typeof $TelegramQueue ] = "nothing") do={:set TelegramQueue ({})} --- > > :if ([ :typeof $TelegramQueue ] = "nothing") do={ > :set TelegramQueue ({}); > } -190a225 +194a225 > -193a229 +197a229 > -196a233 +200a233 > -199a237 +203a237 > -201,202c239,242 +205,206c239,242 < } do={:global ExitOnError; $ExitOnError $0 $Err} < } --- @@ -144,7 +116,7 @@ > :global ExitOnError; $ExitOnError $0 $Err; > } } > -205a246 +209a246 > -206a248 +210a248 >