2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-27 04:18:04 +00:00

Use Photo as type for UserProfilePhotos photos list

This commit is contained in:
Dan 2018-06-28 19:08:21 +02:00
parent b8bfb43a80
commit abbf7e6684

View File

@ -815,13 +815,25 @@ def parse_profile_photos(photos):
),
width=size.w,
height=size.h,
file_size=file_size,
date=photo.date
file_size=file_size
)
photo_sizes.append(photo_size)
user_profile_photos.append(photo_sizes)
user_profile_photos.append(
pyrogram_types.Photo(
id=b64encode(
pack(
"<qq",
photo.id,
photo.access_hash
),
b"-_"
).decode().rstrip("="),
date=photo.date,
sizes=photo_sizes
)
)
return pyrogram_types.UserProfilePhotos(
total_count=total_count,