We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf9e186 commit 9b28a12Copy full SHA for 9b28a12
1 file changed
pyrogram/types/user_and_chats/chat.py
@@ -221,7 +221,7 @@ def _parse_channel_chat(client, channel: raw.types.Channel) -> "Chat":
221
222
return Chat(
223
id=peer_id,
224
- type="supergroup" if channel.megagroup else "channel",
+ type="supergroup" if getattr(channel, "megagroup", None) else "channel",
225
is_verified=getattr(channel, "verified", None),
226
is_restricted=getattr(channel, "restricted", None),
227
is_creator=getattr(channel, "creator", None),
0 commit comments