mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-08-05 10:44:59 +02:00
telegram-chat: act on reply from self
This commit is contained in:
parent
fd1263324d
commit
399d952ac2
5 changed files with 20 additions and 2 deletions
|
@ -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 ]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue