Prevent crash if telegram message failed and did not generate an ID (#137989)
Fix #137901 - Regression introduced in 6fdccda225
pull/138231/head
parent
090dbba06e
commit
7903348d79
|
@ -756,7 +756,8 @@ class TelegramNotificationService:
|
||||||
message_thread_id=params[ATTR_MESSAGE_THREAD_ID],
|
message_thread_id=params[ATTR_MESSAGE_THREAD_ID],
|
||||||
context=context,
|
context=context,
|
||||||
)
|
)
|
||||||
msg_ids[chat_id] = msg.id
|
if msg is not None:
|
||||||
|
msg_ids[chat_id] = msg.id
|
||||||
return msg_ids
|
return msg_ids
|
||||||
|
|
||||||
async def delete_message(self, chat_id=None, context=None, **kwargs):
|
async def delete_message(self, chat_id=None, context=None, **kwargs):
|
||||||
|
|
Loading…
Reference in New Issue