mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-27 20:37:54 +00:00
Use Photo as type for UserProfilePhotos photos list
This commit is contained in:
parent
b8bfb43a80
commit
abbf7e6684
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user