From 399d952ac21057c5ab88120bef4a400b06caea3b Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 10 Oct 2023 13:16:58 +0200 Subject: telegram-chat: act on reply from self --- telegram-chat.rsc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'telegram-chat.rsc') diff --git a/telegram-chat.rsc b/telegram-chat.rsc index 6083fee..29130db 100644 --- a/telegram-chat.rsc +++ b/telegram-chat.rsc @@ -17,6 +17,7 @@ :global TelegramChatIdsTrusted; :global TelegramChatOffset; :global TelegramChatRunTime; +:global TelegramMessageIDs; :global TelegramTokenId; :global CertificateAvailable; @@ -83,7 +84,8 @@ $WaitFullyConnected; $LogPrintExit2 info $0 ("Now " . [ $IfThenElse $TelegramChatActive "active" "passive" ] . \ " from update " . $UpdateID . "!") false; } else={ - :if ($TelegramChatActive = true && [ :len ($Message->"text") ] > 0) do={ + :if (($TelegramMessageIDs->([ $ParseJson ($Message->"reply_to_message") ]->"message_id") = 1 || \ + $TelegramChatActive = true) && [ :len ($Message->"text") ] > 0) do={ :if ([ $ValidateSyntax ($Message->"text") ] = true) do={ :local State ""; :local File ("tmpfs/telegram-chat/" . [ $GetRandom20CharAlNum 6 ]); -- cgit v1.2.3-54-g00ecf