diff options
author | Christian Hesse <mail@eworm.de> | 2023-02-04 23:24:44 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2023-02-04 23:24:44 +0100 |
commit | 9c066599e8a57bfcf26eacb18fcca8f404938f15 (patch) | |
tree | f541d8c47e67cf680aa1c33b3b8f8153cef333b3 /telegram-chat | |
parent | 600203797bdde92b606fa916d4066304c95bd58f (diff) |
telegram-chat: handle exceeded file read size
Diffstat (limited to 'telegram-chat')
-rw-r--r-- | telegram-chat | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/telegram-chat b/telegram-chat index 4c6ea21..c6a4c3b 100644 --- a/telegram-chat +++ b/telegram-chat @@ -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; \ |