diff --git a/pyrogram/client.py b/pyrogram/client.py index f213c57a..c74634ea 100644 --- a/pyrogram/client.py +++ b/pyrogram/client.py @@ -510,7 +510,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 = ( @@ -519,6 +519,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