Skip to content

Commit b41b574

Browse files
MrMissxalissonlauffer
authored andcommitted
Fix AttributeError when received ChatForbidden
1 parent 23fd547 commit b41b574

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • pyrogram/types/user_and_chats

pyrogram/types/user_and_chats/chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ async def _parse_full(client, chat_full: Union[raw.types.messages.ChatFull, raw.
351351

352352
@staticmethod
353353
def _parse_chat(client, chat: Union[raw.types.Chat, raw.types.User, raw.types.Channel]) -> "Chat":
354-
if isinstance(chat, raw.types.Chat):
354+
if isinstance(chat, (raw.types.Chat, raw.types.ChatForbidden)):
355355
return Chat._parse_chat_chat(client, chat)
356356
elif isinstance(chat, raw.types.User):
357357
return Chat._parse_user_chat(client, chat)

0 commit comments

Comments
 (0)