aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-02-01 14:25:13 +0100
committerGravatar Christian Hesse <mail@eworm.de>2023-02-01 14:26:28 +0100
commit8dd53c80f53d504b9e2c9a8e20e98bdedb477824 (patch)
tree1455d865d87b9f187d785cd1f49c0e44aa57902d
parentb5399099c6bd01b46cb1e6d0074a0d8b0715d707 (diff)
telegram-chat: modify text if no output available
-rw-r--r--telegram-chat3
1 files changed, 2 insertions, 1 deletions
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; \