Treat users "kicking themselves" as leaving (#1116)

This commit is contained in:
Lonami Exo 2019-02-27 19:42:17 +01:00
parent 05d174d4ce
commit 934c733ccb

View File

@ -148,7 +148,9 @@ class ChatAction(EventBuilder):
self.user_added = True
self._added_by = added_by
if kicked_by is True:
# If `from_id` was not present (it's ``True``) or the affected
# user was "kicked by itself", then it left. Else it was kicked.
if kicked_by is True or kicked_by == users:
self.user_left = True
elif kicked_by:
self.user_kicked = True