From 7a79e5a0c442dd57712a5984ed714df4497460db Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Fri, 4 May 2018 18:37:36 +0200 Subject: [PATCH] Add media type 1 --- pyrogram/client/client.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index f96b4e1f..ab2e027c 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -135,6 +135,7 @@ class Client: MEDIA_TYPE_ID = { 0: "thumbnail", + 1: "thumbnail", 2: "photo", 3: "voice", 4: "video", @@ -734,9 +735,7 @@ class Client: extension = ".webp" elif media_type == 9: extension = mimetypes.guess_extension(media.mime_type) or ".mp3" - elif media_type == 0: - extension = ".jpg" - elif media_type == 2: + elif media_type in (0, 1, 2): extension = ".jpg" else: continue