Use Photo as type for media messages

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

View File

@ -329,13 +329,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)
photo = photo_sizes
photo = pyrogram_types.Photo(
id=b64encode(
pack(
"<qq",
photo.id,
photo.access_hash
),
b"-_"
).decode().rstrip("="),
date=photo.date,
sizes=photo_sizes
)
elif isinstance(media, types.MessageMediaGeo):
geo_point = media.geo