From cdfb086b490cafd685e947433515e43dc5547a62 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 31 Mar 2025 11:19:23 +0200 Subject: [PATCH] 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. --- mod/notification-telegram.rsc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mod/notification-telegram.rsc b/mod/notification-telegram.rsc index 68e913f..5ef353b 100644 --- a/mod/notification-telegram.rsc +++ b/mod/notification-telegram.rsc @@ -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={