From 71bdfe6c407e0622cc337f51dc8383abc89880e4 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sat, 29 Aug 2020 17:26:16 +0200 Subject: [PATCH] Fix get_profile_photos not working correctly in case of no chat photos --- pyrogram/methods/users/get_profile_photos.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyrogram/methods/users/get_profile_photos.py b/pyrogram/methods/users/get_profile_photos.py index 8a222564..6ccfb8f8 100644 --- a/pyrogram/methods/users/get_profile_photos.py +++ b/pyrogram/methods/users/get_profile_photos.py @@ -100,7 +100,10 @@ class GetProfilePhotos(Scaffold): else: photos = extra else: - photos = [current] + if current: + photos = [current] + else: + photos = [] return types.List(photos[offset:limit]) else: