mirror of https://gitlab.com/litecord/litecord.git
gateway: only remove self if it is in ready.users
This commit is contained in:
parent
265de527a9
commit
70678aaaf3
|
|
@ -86,7 +86,8 @@ def _complete_users_list(user_id: str, base_ready, user_ready) -> dict:
|
||||||
for recipient in private_channel["recipients"]:
|
for recipient in private_channel["recipients"]:
|
||||||
users_to_send[recipient["id"]] = recipient
|
users_to_send[recipient["id"]] = recipient
|
||||||
|
|
||||||
users_to_send.pop(user_id)
|
if user_id in users_to_send:
|
||||||
|
users_to_send.pop(user_id)
|
||||||
|
|
||||||
ready = {**base_ready, **user_ready}
|
ready = {**base_ready, **user_ready}
|
||||||
ready["users"] = [value for value in users_to_send.values()]
|
ready["users"] = [value for value in users_to_send.values()]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue