mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-05 03:22:29 +00:00
Handle ChannelForbidden on leaving ChatAction
This commit is contained in:
@@ -45,7 +45,7 @@ class ChatAction(EventBuilder):
|
|||||||
peer = types.PeerChannel(update.channel_id)
|
peer = types.PeerChannel(update.channel_id)
|
||||||
channel = update._entities.get(utils.get_peer_id(peer))
|
channel = update._entities.get(utils.get_peer_id(peer))
|
||||||
if channel is not None:
|
if channel is not None:
|
||||||
if channel.left:
|
if isinstance(channel, types.ChannelForbidden) or channel.left:
|
||||||
return cls.Event(peer,
|
return cls.Event(peer,
|
||||||
kicked_by=True)
|
kicked_by=True)
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user