From 4adc55a0704df7e1a9feea4ebba90047aa63d56b Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Thu, 5 Apr 2018 08:22:27 +0200 Subject: [PATCH] Move GIF handling before Video to avoid an extra check --- pyrogram/client/utils.py | 42 ++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) 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( - "