:global GlobalFuncReady false;
# Git commit id & info, expected configuration version
-:global CommitId "main/315/84d64b90";
+:global CommitId "main/316/a9611f32";
:global CommitTAG "unknown";
-:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 00:15:02 01.05.2026.";
+:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 00:20:03 01.05.2026.";
# The variables are received right here.
:global GlobalConfVersion 138;
#
# requires RouterOS, version=7.19
# requires device-mode, fetch, scheduler
-:local ExitOK false;
-:onerror Err {
- :global GlobalConfReady; :global GlobalFuncReady;
- :retry { :if ($GlobalConfReady != true || $GlobalFuncReady != true) \
- do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
- :local ScriptName [ :jobname ];
-
:global FlushTelegramQueue;
:global GetTelegramChatId;
:global NotificationFunctions;
-1,5c1,4
-< #!rsc by Vados
-< # RouterOS script: mod/AM-TG-Notifications
-< # Script comment: Script send Notifications in Telegram
-< # Copyright (c) 2007-2026 Vados <vados@vados.ru>
-< #
----
-> #!rsc by RouterOS
-> # RouterOS script: mod/notification-telegram
-> # Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
-> # https://rsc.eworm.de/COPYING.md
-9,14c8,10
+6a7
+> #
+9,15d9
< :local ExitOK false;
< :onerror Err {
< :global GlobalConfReady; :global GlobalFuncReady;
< :retry { :if ($GlobalConfReady != true || $GlobalFuncReady != true) \
< do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
< :local ScriptName [ :jobname ];
----
-> #
-> # send notifications via Telegram
-> # https://rsc.eworm.de/doc/mod/notification-telegram.md
-26a23
+<
+26a21
>
-34a32
+34a30
>
-41a40
+41a38
>
-44a44
+44a42
>
-58a59
+58a57
>
-64c65
+64c63
< :global ExitOnError; $ExitOnError $0 $Err;
---
> :global ExitOnError; $ExitOnError $0 $Err;
-69a71
+69a69
>
-71a74
+71a72
>
-75a79
+75a77
>
-84a89
+84a87
>
-86a92
+86a90
>
-90a97
+90a95
>
-97,98c104,105
+97,98c102,103
< :global ExitOnError; $ExitOnError $0 $Err;
< } }
---
> :global ExitOnError; $ExitOnError $0 $Err;
> } }
-102a110
+102a108
>
-112a121
+112a119
>
-120a130
+120a128
>
-124a135
+124a133
>
-126a138
+126a136
>
-137c149,153
+137c147,151
< :if ($Mode = "body") do={:return ("```\n" . $Text . "\n```")}
---
>
> :return ("```\n" . $Text . "\n```");
> }
>
-139a156
+139a154
>
-146,147c163,171
+146,147c161,169
< :if ([ :len $TokenId ] = 0 || [ :len $ChatId ] = 0) do={:return false}
< :if ([ :typeof $TelegramMessageIDs ] = "nothing") do={:set TelegramMessageIDs ({})}
---
> :set TelegramMessageIDs ({});
> }
>
-158c182,184
+158c180,182
< } else={:set Text ($Text . [ $EscapeMD ($Notification->"message") "body" ])}
---
> } else={
> :set Text ($Text . [ $EscapeMD ($Notification->"message") "body" ]);
> }
-168a195
+168a193
>
-183c210,213
+183c208,211
< :if ([ :typeof $TelegramQueue ] = "nothing") do={:set TelegramQueue ({})}
---
>
> :if ([ :typeof $TelegramQueue ] = "nothing") do={
> :set TelegramQueue ({});
> }
-194a225
+194a223
>
-197a229
+197a227
>
-200a233
+200a231
>
-203a237
+203a235
>
-205,206c239,242
+205,206c237,240
< } do={:global ExitOnError; $ExitOnError $0 $Err}
< }
---
> :global ExitOnError; $ExitOnError $0 $Err;
> } }
>
-209a246
+209a244
>
-210a248
+210a246
>
-#!rsc by RouterOS
-# RouterOS script: mod/notification-telegram
-# Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
-# https://rsc.eworm.de/COPYING.md
+#!rsc by Vados
+# RouterOS script: mod/AM-TG-Notifications
+# Script comment: Script send Notifications in Telegram
+# Copyright (c) 2007-2026 Vados <vados@vados.ru>
+#
#
# requires RouterOS, version=7.19
# requires device-mode, fetch, scheduler
-#
-# send notifications via Telegram
-# https://rsc.eworm.de/doc/mod/notification-telegram.md
-
:global FlushTelegramQueue;
:global GetTelegramChatId;
:global NotificationFunctions;