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

telegram-chat: handle exceeded file read size

This commit is contained in:
Christian Hesse
2023-02-04 23:24:44 +01:00
parent 600203797b
commit 9c066599e8

View File

@ -115,7 +115,8 @@ $WaitFullyConnected;
$SendTelegram2 ({ origin=$0; chatid=$ChatID; silent=false; \
subject=([ $SymbolForNotification "speech-balloon" ] . "Telegram Chat"); \
message=("Command:\n" . $Text . "\n\n" . $State . [ $IfThenElse ([ :len $Content ] > 0) \
("Output:\n" . $Content) "No output available." ]) });
("Output:\n" . $Content) [ $IfThenElse ([ /file/get ($File . ".txt") size ] > 0) \
("Output exceeds file read size.") ("No output.") ] ]) });
/file/remove "tmpfs/telegram-chat";
} else={
$SendTelegram2 ({ origin=$0; chatid=$ChatID; silent=false; \