From 820fe2cbcd9a5d63476339e4595d7433863b0f8c Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Fri, 1 Jan 2021 22:21:06 +0100 Subject: [PATCH] Fix thumbnail downloads --- pyrogram/client.py | 4 ++-- pyrogram/file_id.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyrogram/client.py b/pyrogram/client.py index 68afabf6..5c95296a 100644 --- a/pyrogram/client.py +++ b/pyrogram/client.py @@ -880,7 +880,7 @@ class Client(Methods, Scaffold): local_id=file_id.local_id, big=file_id.thumbnail_source == ThumbnailSource.CHAT_PHOTO_BIG ) - elif file_type in (FileType.THUMBNAIL, FileType.PHOTO): + elif file_type == FileType.PHOTO: location = raw.types.InputPhotoFileLocation( id=file_id.media_id, access_hash=file_id.access_hash, @@ -892,7 +892,7 @@ class Client(Methods, Scaffold): id=file_id.media_id, access_hash=file_id.access_hash, file_reference=file_id.file_reference, - thumb_size="" + thumb_size=file_id.thumbnail_size ) limit = 1024 * 1024 diff --git a/pyrogram/file_id.py b/pyrogram/file_id.py index 8bca0edd..c91c6431 100644 --- a/pyrogram/file_id.py +++ b/pyrogram/file_id.py @@ -166,7 +166,7 @@ class FileId: volume_id: int = None, thumbnail_source: ThumbnailSource = None, thumbnail_file_type: FileType = None, - thumbnail_size: str = None, + thumbnail_size: str = "", secret: int = None, local_id: int = None, chat_id: int = None,