diff --git a/pyrogram/client/types/user_and_chats/chat_photo.py b/pyrogram/client/types/user_and_chats/chat_photo.py index 08e43138..1885eff2 100644 --- a/pyrogram/client/types/user_and_chats/chat_photo.py +++ b/pyrogram/client/types/user_and_chats/chat_photo.py @@ -50,31 +50,24 @@ class ChatPhoto(PyrogramType): self.big_file_id = big_file_id @staticmethod - def _parse(client, chat_photo: types.UserProfilePhoto or types.ChatPhoto): + def _parse(client, chat_photo: types.UserProfilePhoto or types.ChatPhoto, peer_id: int): if not isinstance(chat_photo, (types.UserProfilePhoto, types.ChatPhoto)): return None - if not isinstance(chat_photo.photo_small, types.FileLocation): - return None - - if not isinstance(chat_photo.photo_big, types.FileLocation): - return None - - photo_id = getattr(chat_photo, "photo_id", 0) loc_small = chat_photo.photo_small loc_big = chat_photo.photo_big return ChatPhoto( small_file_id=encode( pack( - "