fix(gateway): preserve document type when merging queued events

This commit is contained in:
hharry11 2026-04-27 17:15:38 +03:00 committed by Teknium
parent adaee2c72c
commit 158eb32686
2 changed files with 38 additions and 0 deletions

View file

@ -1034,6 +1034,11 @@ def merge_pending_message_event(
existing.text = event.text
if existing_is_photo or incoming_is_photo:
existing.message_type = MessageType.PHOTO
elif (
getattr(existing, "message_type", None) == MessageType.TEXT
and event.message_type != MessageType.TEXT
):
existing.message_type = event.message_type
return
if (