mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 12:57:52 +00:00
Add photo_id
This commit is contained in:
parent
ef45288419
commit
68986171ef
@ -74,19 +74,20 @@ def parse_chat_photo(photo):
|
|||||||
if not isinstance(photo.photo_big, types.FileLocation):
|
if not isinstance(photo.photo_big, types.FileLocation):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
photo_id = getattr(photo, "photo_id", 0)
|
||||||
loc_small = photo.photo_small
|
loc_small = photo.photo_small
|
||||||
loc_big = photo.photo_big
|
loc_big = photo.photo_big
|
||||||
|
|
||||||
return pyrogram_types.ChatPhoto(
|
return pyrogram_types.ChatPhoto(
|
||||||
small_file_id=encode(
|
small_file_id=encode(
|
||||||
pack(
|
pack(
|
||||||
"<iiqqqqi", 1, loc_small.dc_id, 0, 0, loc_small.volume_id,
|
"<iiqqqqi", 1, loc_small.dc_id, photo_id, 0, loc_small.volume_id,
|
||||||
loc_small.secret, loc_small.local_id
|
loc_small.secret, loc_small.local_id
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
big_file_id=encode(
|
big_file_id=encode(
|
||||||
pack(
|
pack(
|
||||||
"<iiqqqqi", 1, loc_big.dc_id, 0, 0, loc_big.volume_id,
|
"<iiqqqqi", 1, loc_big.dc_id, photo_id, 0, loc_big.volume_id,
|
||||||
loc_big.secret, loc_big.local_id
|
loc_big.secret, loc_big.local_id
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user