mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-06-21 01:15:42 +02:00
telegram-chat: support debug output for updates in JSON
This commit is contained in:
parent
1b5dd1e1d3
commit
f1396b83aa
1 changed files with 3 additions and 0 deletions
|
@ -33,6 +33,7 @@
|
|||
:global GetRandom20CharAlNum;
|
||||
:global IfThenElse;
|
||||
:global LogPrint;
|
||||
:global LogPrintVerbose;
|
||||
:global MAX;
|
||||
:global MIN;
|
||||
:global MkDir;
|
||||
|
@ -96,6 +97,8 @@
|
|||
:local Uptime [ /system/resource/get uptime ];
|
||||
:foreach Update in=($JSON->"result") do={
|
||||
:set UpdateID ($Update->"update_id");
|
||||
$LogPrintVerbose debug $ScriptName ("Update " . $UpdateID . ": " . [ :serialize to=json $Update ]);
|
||||
|
||||
:local Message ($Update->"message");
|
||||
:local IsReply ([ :typeof ($Message->"reply_to_message") ] = "string");
|
||||
:local IsMyReply ($TelegramMessageIDs->[ :tostr ($Message->"reply_to_message"->"message_id") ]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue