mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-06-21 01:25:52 +02:00
mod/notification-telegram: fix override quirk
IDs for chat and thread can be overridden. Overriding the chat probably makes the thread invalid - so ignore that then.
This commit is contained in:
parent
3c30276e23
commit
cdfb086b49
1 changed files with 2 additions and 1 deletions
|
@ -151,7 +151,8 @@
|
|||
:local ChatId [ $EitherOr ($Notification->"chatid") \
|
||||
[ $EitherOr ($TelegramChatIdOverride->($Notification->"origin")) $TelegramChatId ] ];
|
||||
:local ThreadId [ $EitherOr ($Notification->"threadid") \
|
||||
[ $EitherOr ($TelegramThreadIdOverride->($Notification->"origin")) $TelegramThreadId ] ];
|
||||
[ $EitherOr ($TelegramThreadIdOverride->($Notification->"origin")) \
|
||||
[ $IfThenElse ([ :len ($TelegramChatIdOverride->($Notification->"origin")) ] = 0) $TelegramThreadId ] ] ];
|
||||
:local TokenId [ $EitherOr ($TelegramTokenIdOverride->($Notification->"origin")) $TelegramTokenId ];
|
||||
|
||||
:if ([ :len $TokenId ] = 0 || [ :len $ChatId ] = 0) do={
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue