Handle ChannelForbidden on leaving ChatAction

This commit is contained in:
Lonami Exo 2019-12-27 10:21:37 +01:00
parent 0af823e86c
commit 94ff5a8641

View File

@ -45,7 +45,7 @@ class ChatAction(EventBuilder):
peer = types.PeerChannel(update.channel_id)
channel = update._entities.get(utils.get_peer_id(peer))
if channel is not None:
if channel.left:
if isinstance(channel, types.ChannelForbidden) or channel.left:
return cls.Event(peer,
kicked_by=True)
else: