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:
parent
293e63008b
commit
d5fc21e6f4
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user