diff --git a/pyrogram/client/utils.py b/pyrogram/client/utils.py index da86a104..43dba6d4 100644 --- a/pyrogram/client/utils.py +++ b/pyrogram/client/utils.py @@ -242,7 +242,27 @@ def parse_message(message: types.Message, users: dict, chats: dict) -> pyrogram. mime_type=doc.mime_type, file_size=doc.size ) - elif types.DocumentAttributeVideo in attributes and types.DocumentAttributeAnimated not in attributes: + elif types.DocumentAttributeAnimated in attributes: + document = pyrogram.Document( + file_id=encode( + pack( + " pyrogram. # TODO: Emoji, set_name and mask_position file_size=doc.size, ) - elif types.DocumentAttributeAnimated in attributes: - document = pyrogram.Document( - file_id=encode( - pack( - "