Prevent crash if telegram message failed and did not generate an ID (#137989)

Fix #137901 - Regression introduced in 6fdccda225
pull/138231/head
Daniel O'Connor 2025-02-10 20:17:02 +10:30 committed by Franck Nijhof
parent 090dbba06e
commit 7903348d79
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
1 changed files with 2 additions and 1 deletions

View File

@ -756,6 +756,7 @@ class TelegramNotificationService:
message_thread_id=params[ATTR_MESSAGE_THREAD_ID],
context=context,
)
if msg is not None:
msg_ids[chat_id] = msg.id
return msg_ids