mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-26 03:13:45 +03:00
Fix "user joined" being "user added itself"
This commit is contained in:
parent
59f6b75391
commit
c1046c2acc
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user