mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 21:07:59 +00:00
Use Photo as type for new_chat_photo
This commit is contained in:
parent
a3761144b3
commit
b8bfb43a80
@ -674,13 +674,23 @@ def parse_messages(
|
|||||||
),
|
),
|
||||||
width=size.w,
|
width=size.w,
|
||||||
height=size.h,
|
height=size.h,
|
||||||
file_size=file_size,
|
file_size=file_size
|
||||||
date=photo.date
|
|
||||||
)
|
)
|
||||||
|
|
||||||
photo_sizes.append(photo_size)
|
photo_sizes.append(photo_size)
|
||||||
|
|
||||||
new_chat_photo = photo_sizes
|
new_chat_photo = pyrogram_types.Photo(
|
||||||
|
id=b64encode(
|
||||||
|
pack(
|
||||||
|
"<qq",
|
||||||
|
photo.id,
|
||||||
|
photo.access_hash
|
||||||
|
),
|
||||||
|
b"-_"
|
||||||
|
).decode().rstrip("="),
|
||||||
|
date=photo.date,
|
||||||
|
sizes=photo_sizes
|
||||||
|
)
|
||||||
|
|
||||||
m = pyrogram_types.Message(
|
m = pyrogram_types.Message(
|
||||||
message_id=message.id,
|
message_id=message.id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user