Use Photo as type for new_chat_photo

This commit is contained in:
Dan 2018-06-28 19:07:56 +02:00
parent a3761144b3
commit b8bfb43a80

View File

@ -674,13 +674,23 @@ def parse_messages(
),
width=size.w,
height=size.h,
file_size=file_size,
date=photo.date
file_size=file_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(
message_id=message.id,