1
0
mirror of https://github.com/eworm-de/routeros-scripts.git synced 2024-05-11 05:55:19 +00:00

telegram-chat: discard messages without text

This commit is contained in:
Christian Hesse
2023-02-02 11:30:49 +01:00
parent 82003bc7d1
commit c47c9a2906

View File

@ -97,7 +97,7 @@ $WaitFullyConnected;
} }
$LogPrintExit2 info $0 ("Now " . [ $IfThenElse $TelegramChatActive "active" "passive" ] . "!") false; $LogPrintExit2 info $0 ("Now " . [ $IfThenElse $TelegramChatActive "active" "passive" ] . "!") false;
} else={ } else={
:if ($TelegramChatActive = true && [ :len $Text ] > 0) do={ :if ($TelegramChatActive = true && $Text != false && [ :len $Text ] > 0) do={
:if ([ $ValidateSyntax $Text ] = true) do={ :if ([ $ValidateSyntax $Text ] = true) do={
:local State ""; :local State "";
:local File ("tmpfs/telegram-chat/" . [ $GetRandom20CharAlNum 6 ]); :local File ("tmpfs/telegram-chat/" . [ $GetRandom20CharAlNum 6 ]);