2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 21:07:59 +00:00

Get the proper biggest photo size

This commit is contained in:
Dan 2020-07-27 14:27:09 +02:00
parent 293e63008b
commit d5fc21e6f4

View File

@ -82,7 +82,7 @@ class Photo(Object):
@staticmethod
def _parse(client, photo: types.Photo, ttl_seconds: int = None) -> "Photo":
if isinstance(photo, types.Photo):
big = photo.sizes[-1]
big = list(filter(lambda p: isinstance(p, types.PhotoSize), photo.sizes))[-1]
return Photo(
file_id=encode_file_id(