From 70fa667ef9fa80e9d967b1c2ad451a02577071fc Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Wed, 4 Apr 2018 22:24:09 +0200 Subject: [PATCH] Handle Video and VideoNote type --- pyrogram/client/utils.py | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/pyrogram/client/utils.py b/pyrogram/client/utils.py index 196e795b..1f24373d 100644 --- a/pyrogram/client/utils.py +++ b/pyrogram/client/utils.py @@ -139,6 +139,8 @@ def parse_message(message: types.Message, users: dict, chats: dict): location = None contact = None audio = None + video = None + video_note = None media = message.media @@ -221,6 +223,43 @@ def parse_message(message: types.Message, users: dict, chats: dict): mime_type=doc.mime_type, file_size=doc.size ) + elif types.DocumentAttributeVideo in attributes: + video_attributes = attributes[types.DocumentAttributeVideo] + + if video_attributes.round_message: + video_note = pyrogram.VideoNote( + file_id=encode( + pack( + "