mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 20:14:51 +00:00
Separate cases between Channel and ChannelForbidden
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
8940c7d1f6
commit
d398b5b29c
1 changed files with 5 additions and 1 deletions
|
|
@ -475,7 +475,7 @@ class Client(Methods):
|
|||
peer_id = -peer.id
|
||||
access_hash = 0
|
||||
peer_type = "group"
|
||||
elif isinstance(peer, (raw.types.Channel, raw.types.ChannelForbidden)):
|
||||
elif isinstance(peer, raw.types.Channel):
|
||||
peer_id = utils.get_channel_id(peer.id)
|
||||
access_hash = peer.access_hash
|
||||
username = (
|
||||
|
|
@ -484,6 +484,10 @@ class Client(Methods):
|
|||
else None
|
||||
)
|
||||
peer_type = "channel" if peer.broadcast else "supergroup"
|
||||
elif isinstance(peer, raw.types.ChannelForbidden):
|
||||
peer_id = utils.get_channel_id(peer.id)
|
||||
access_hash = peer.access_hash
|
||||
peer_type = "channel" if peer.broadcast else "supergroup"
|
||||
else:
|
||||
continue
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue