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:
Christian Hesse 2025-03-31 11:19:23 +02:00
parent 3c30276e23
commit cdfb086b49

View file

@ -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={