Skip to content

Commit 71bdfe6

Browse files
committed
Fix get_profile_photos not working correctly in case of no chat photos
1 parent 2c99926 commit 71bdfe6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pyrogram/methods/users/get_profile_photos.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ async def get_profile_photos(
100100
else:
101101
photos = extra
102102
else:
103-
photos = [current]
103+
if current:
104+
photos = [current]
105+
else:
106+
photos = []
104107

105108
return types.List(photos[offset:limit])
106109
else:

0 commit comments

Comments
 (0)