aboutsummaryrefslogtreecommitdiffstats
path: root/telegram-chat.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-10-13 21:54:50 +0200
committerGravatar Christian Hesse <mail@eworm.de>2023-10-16 15:27:14 +0200
commit1b62545d8c5b186e9059c9640761a12ad336ec7b (patch)
treeca34a856dd1ba4950bf0e2ae4d6b725a42e57e8e /telegram-chat.rsc
parent15873e2fdb20ad74e8ba9f0cf3dd7331ad143809 (diff)
telegram-chat: answer question mark with short noticechange-106-2
Diffstat (limited to 'telegram-chat.rsc')
-rw-r--r--telegram-chat.rsc8
1 files changed, 7 insertions, 1 deletions
diff --git a/telegram-chat.rsc b/telegram-chat.rsc
index e063e80..16edbca 100644
--- a/telegram-chat.rsc
+++ b/telegram-chat.rsc
@@ -77,7 +77,13 @@ $WaitFullyConnected;
:if ($Trusted = true) do={
:local Done false;
- :if ([ :pick ($Message->"text") 0 1 ] = "!") do={
+ :if ($Message->"text" = "?") do={
+ $SendTelegram2 ({ origin=$0; chatid=($Chat->"id"); silent=false; replyto=($Message->"message_id"); \
+ subject=([ $SymbolForNotification "speech-balloon" ] . "Telegram Chat"); \
+ message=("Online, awaiting your commands!") });
+ :set Done true;
+ }
+ :if ($Done = false && [ :pick ($Message->"text") 0 1 ] = "!") do={
:if ($Message->"text" ~ ("^! *(" . [ $EscapeForRegEx $Identity ] . "|@" . $TelegramChatGroups . ")\$")) do={
:set TelegramChatActive true;
} else={