From dc732c76df8457fd556e713eb3cba320d7a597e3 Mon Sep 17 00:00:00 2001 From: ferferga Date: Wed, 16 May 2018 23:05:22 +0200 Subject: [PATCH] Better handling of video notes As said in https://t.me/TelethonChat/33059 , the "0,1,1" values work better for all kind of videos, instead of the "0,0,0", which gave some problems with videos not recorded by the official apps. --- telethon/telegram_client.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/telethon/telegram_client.py b/telethon/telegram_client.py index 0c9c53a8..0c2bd122 100644 --- a/telethon/telegram_client.py +++ b/telethon/telegram_client.py @@ -1632,9 +1632,12 @@ class TelegramClient(TelegramBareClient): duration=int(m.get('duration').seconds if m.has('duration') else 0) ) + elif video_note: + doc = DocumentAttributeVideo(0, 1, 1, + round_message=True) else: doc = DocumentAttributeVideo(0, 0, 0, - round_message=video_note) + round_message=False) attr_dict[DocumentAttributeVideo] = doc else: