From 06cff496a087d35eb6d94be5c327475300f8b8e9 Mon Sep 17 00:00:00 2001 From: wulan17 Date: Mon, 2 Sep 2024 20:31:50 +0700 Subject: [PATCH] pyrofork: Fix get_chat_photo incase photo not found and limit param is enabled Signed-off-by: wulan17 --- pyrogram/methods/users/get_chat_photos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/methods/users/get_chat_photos.py b/pyrogram/methods/users/get_chat_photos.py index 6c34d6a5a..5cdb0f309 100644 --- a/pyrogram/methods/users/get_chat_photos.py +++ b/pyrogram/methods/users/get_chat_photos.py @@ -99,7 +99,7 @@ async def get_chat_photos( extra = [message.new_chat_photo for message in r] if extra: - if current: + if current and len(current) > 0: photos = (current + extra) if current[0].file_id != extra[0].file_id else extra else: photos = extra