diff options
author | Christian Hesse <mail@eworm.de> | 2023-10-16 13:05:21 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2023-10-16 15:27:14 +0200 |
commit | bc4839f61130695f504ccd3745dd099540db5206 (patch) | |
tree | 48ce9287135473f5deee01ebffdccd27a5948c3e /telegram-chat.rsc | |
parent | 1b62545d8c5b186e9059c9640761a12ad336ec7b (diff) |
telegram-chat: rename variable
Diffstat (limited to 'telegram-chat.rsc')
-rw-r--r-- | telegram-chat.rsc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/telegram-chat.rsc b/telegram-chat.rsc index 16edbca..1a89544 100644 --- a/telegram-chat.rsc +++ b/telegram-chat.rsc @@ -63,8 +63,8 @@ $WaitFullyConnected; :local Update [ $ParseJson $UpdateArray ]; :set UpdateID ($Update->"update_id"); :local Message [ $ParseJson ($Update->"message") ]; - :local IsReply ($TelegramMessageIDs->([ $ParseJson ($Message->"reply_to_message") ]->"message_id")); - :if (($IsReply = 1 || $TelegramChatOffset->0 > 0 || $Uptime > 5m) && $UpdateID >= $TelegramChatOffset->2) do={ + :local IsMyReply ($TelegramMessageIDs->([ $ParseJson ($Message->"reply_to_message") ]->"message_id")); + :if (($IsMyReply = 1 || $TelegramChatOffset->0 > 0 || $Uptime > 5m) && $UpdateID >= $TelegramChatOffset->2) do={ :local Trusted false; :local Chat [ $ParseJson ($Message->"chat") ]; :local From [ $ParseJson ($Message->"from") ]; @@ -93,7 +93,7 @@ $WaitFullyConnected; " from update " . $UpdateID . "!") false; :set Done true; } - :if ($Done = false && ($IsReply = 1 || $TelegramChatActive = true) && [ :len ($Message->"text") ] > 0) do={ + :if ($Done = false && ($IsMyReply = 1 || $TelegramChatActive = true) && [ :len ($Message->"text") ] > 0) do={ :if ([ $ValidateSyntax ($Message->"text") ] = true) do={ :local State ""; :local File ("tmpfs/telegram-chat/" . [ $GetRandom20CharAlNum 6 ]); |