mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-07 15:34:52 +00:00
Separate cases between Channel and ChannelForbidden
This commit is contained in:
parent
fb3f9acc18
commit
0a90d54010
1 changed files with 5 additions and 1 deletions
|
|
@ -510,7 +510,7 @@ class Client(Methods):
|
||||||
peer_id = -peer.id
|
peer_id = -peer.id
|
||||||
access_hash = 0
|
access_hash = 0
|
||||||
peer_type = "group"
|
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)
|
peer_id = utils.get_channel_id(peer.id)
|
||||||
access_hash = peer.access_hash
|
access_hash = peer.access_hash
|
||||||
username = (
|
username = (
|
||||||
|
|
@ -519,6 +519,10 @@ class Client(Methods):
|
||||||
else None
|
else None
|
||||||
)
|
)
|
||||||
peer_type = "channel" if peer.broadcast else "supergroup"
|
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:
|
else:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue