mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-11 08:32: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:
|
if self._raw.access_hash is None:
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
|
ty = PackedType.BROADCAST
|
||||||
|
if getattr(self._raw, "megagroup", False):
|
||||||
|
ty = PackedType.MEGAGROUP
|
||||||
|
elif getattr(self._raw, "gigagroup", False):
|
||||||
|
ty = PackedType.GIGAGROUP
|
||||||
return PackedChat(
|
return PackedChat(
|
||||||
ty=PackedType.GIGAGROUP
|
ty=ty,
|
||||||
if getattr(self._raw, "gigagroup", False)
|
|
||||||
else PackedType.BROADCAST,
|
|
||||||
id=self._raw.id,
|
id=self._raw.id,
|
||||||
access_hash=self._raw.access_hash,
|
access_hash=self._raw.access_hash,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user