mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-26 11:23:46 +03:00
Handle ChannelForbidden on leaving ChatAction
This commit is contained in:
parent
0af823e86c
commit
94ff5a8641
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user