mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-01 05:04:51 +00:00
Add photo_id
This commit is contained in:
parent
ef45288419
commit
68986171ef
1 changed files with 3 additions and 2 deletions
|
|
@ -74,19 +74,20 @@ def parse_chat_photo(photo):
|
|||
if not isinstance(photo.photo_big, types.FileLocation):
|
||||
return None
|
||||
|
||||
photo_id = getattr(photo, "photo_id", 0)
|
||||
loc_small = photo.photo_small
|
||||
loc_big = photo.photo_big
|
||||
|
||||
return pyrogram_types.ChatPhoto(
|
||||
small_file_id=encode(
|
||||
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
|
||||
)
|
||||
),
|
||||
big_file_id=encode(
|
||||
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
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue