Fix "user joined" being "user added itself"

This commit is contained in:
Lonami Exo 2018-06-25 13:21:23 +02:00
parent 59f6b75391
commit c1046c2acc

View File

@ -36,8 +36,10 @@ class ChatAction(EventBuilder):
added_by=True,
users=msg.from_id)
elif isinstance(action, types.MessageActionChatAddUser):
# If an user adds itself, it means they joined
added_by = ([msg.from_id] == action.users) or msg.from_id
event = ChatAction.Event(msg,
added_by=msg.from_id or True,
added_by=added_by,
users=action.users)
elif isinstance(action, types.MessageActionChatDeleteUser):
event = ChatAction.Event(msg,