diff --git a/pyrogram/types/bots_and_keyboards/requested_chat.py b/pyrogram/types/bots_and_keyboards/requested_chat.py index 6ccefe87..a096e02e 100644 --- a/pyrogram/types/bots_and_keyboards/requested_chat.py +++ b/pyrogram/types/bots_and_keyboards/requested_chat.py @@ -65,8 +65,10 @@ class RequestedChat(Object): "raw.types.PeerChannel" ] ) -> "RequestedChat": - if isinstance(request, raw.types.RequestedPeerChannel) or isinstance(request, raw.types.PeerChannel): + if getattr(request, "broadcast", None): type = enums.ChatType.CHANNEL + elif getattr(request, "megagroup", None): + type = enums.ChatType.SUPERGROUP else: type = enums.ChatType.GROUP photo = None