Compare commits

..

3 commits

Author SHA1 Message Date
Christian Hesse
b167a2daed DEBUG: fix typo 2025-05-13 10:21:42 +02:00
Christian Hesse
cae5fdc341 telegram-chat: support debug output for Updates in JSON 2025-05-13 10:21:42 +02:00
Christian Hesse
f4f83533b9 telegram-chat: support trusted group chat ids
But be warned: Adding a person to a trusted group will give
her/him administrative control over the device(s) - without
changes on the device itself!
2025-05-13 10:21:38 +02:00
2 changed files with 4 additions and 1 deletions

View file

@ -42,7 +42,7 @@ Other actions (`disk`, `email`, `remote` or `support`) can be used as
well. I do not recommend using `echo` - use [debug output](#debug-output)
instead.
Disable or remote that setting to restore regular logging.
Disable or remove that setting to restore regular logging.
## Verbose output

View file

@ -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") ]);