Fix megagroup attribute on ChatForbidden objects

This commit is contained in:
Dan 2021-12-17 11:49:53 +01:00
parent bf9e186414
commit 9b28a120e2

View File

@ -221,7 +221,7 @@ class Chat(Object):
return Chat(
id=peer_id,
type="supergroup" if channel.megagroup else "channel",
type="supergroup" if getattr(channel, "megagroup", None) else "channel",
is_verified=getattr(channel, "verified", None),
is_restricted=getattr(channel, "restricted", None),
is_creator=getattr(channel, "creator", None),