From 8dd53c80f53d504b9e2c9a8e20e98bdedb477824 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 1 Feb 2023 14:25:13 +0100 Subject: telegram-chat: modify text if no output available --- telegram-chat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/telegram-chat b/telegram-chat index da3f0e5..317f030 100644 --- a/telegram-chat +++ b/telegram-chat @@ -111,7 +111,8 @@ $WaitFullyConnected; :local Content [ /file/get ($File . ".txt") content ]; $SendTelegram2 ({ origin=$0; silent=false; \ subject=([ $SymbolForNotification "speech-balloon" ] . "Telegram Chat"); \ - message=("Command:\n" . $Text . "\n\n" . $State . "Output:\n" . $Content) }); + message=("Command:\n" . $Text . "\n\n" . $State . [ $IfThenElse ([ :len $Content ] > 0) \ + ("Output:\n" . $Content) "No output available." ]) }); /file/remove "tmpfs/telegram-chat"; } else={ $SendTelegram2 ({ origin=$0; silent=false; \ -- cgit v1.2.3-70-g09d2