mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-10 16:12:22 +03:00
fix Channel.pack()'s PackedType check
This commit is contained in:
parent
508a0ab59e
commit
f726d1dcc4
|
@ -54,10 +54,13 @@ class Channel(Chat, metaclass=NoPublicConstructor):
|
|||
if self._raw.access_hash is None:
|
||||
return None
|
||||
else:
|
||||
ty = PackedType.BROADCAST
|
||||
if getattr(self._raw, "megagroup", False):
|
||||
ty = PackedType.MEGAGROUP
|
||||
elif getattr(self._raw, "gigagroup", False):
|
||||
ty = PackedType.GIGAGROUP
|
||||
return PackedChat(
|
||||
ty=PackedType.GIGAGROUP
|
||||
if getattr(self._raw, "gigagroup", False)
|
||||
else PackedType.BROADCAST,
|
||||
ty=ty,
|
||||
id=self._raw.id,
|
||||
access_hash=self._raw.access_hash,
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user