Skip to content

Commit

Permalink
Fix is_forum field for supergroups only
Browse files Browse the repository at this point in the history
  • Loading branch information
KurimuzonAkuma committed Dec 16, 2023
1 parent d8f3795 commit 3c69429
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyrogram/types/user_and_chats/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def _parse_channel_chat(client, channel: raw.types.Channel) -> "Chat":
return Chat(
id=peer_id,
type=enums.ChatType.SUPERGROUP if getattr(channel, "megagroup", None) else enums.ChatType.CHANNEL,
is_forum=getattr(channel, "forum", None),
is_forum=getattr(channel, "forum", None) if getattr(channel, "megagroup", None) else None,
is_verified=getattr(channel, "verified", None),
is_restricted=getattr(channel, "restricted", None),
is_creator=getattr(channel, "creator", None),
Expand Down

0 comments on commit 3c69429

Please sign in to comment.