mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 04:35:24 +00:00
Fix is_forum field for supergroups only
This commit is contained in:
parent
d8f3795afc
commit
3c694293f4
@ -299,7 +299,7 @@ class Chat(Object):
|
||||
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),
|
||||
|
Loading…
Reference in New Issue
Block a user