Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix DMs being marked as with the current user ("me") #1761

Merged
merged 2 commits into from
Feb 20, 2018

Conversation

lukebarnard1
Copy link
Contributor

@lukebarnard1 lukebarnard1 commented Feb 20, 2018

Whilst testing various DM paths, @lukebarnard1 found that there were
many failures to add the room as a DM against the correct user. It
turned out most of the failures seen were because the user chosen
was the current user. If the user accepted an invite it would often
be marked as with themselves because we chose the sender of the
join event as the DM user.

This fix makes the DM room setting process the same for both the
inviting client and the invited client. A RoomState.members
event causes the DM room state to be set in the room, regardless
of whether we are currently joining (see previous impl.)

The two cases for setting a DM are:

  • this user accepting an invite with is_direct
  • this user inviting someone with is_direct

This should handle all cases for setting DM state.

Should fix element-hq/element-web#6088

Whilst testing various DM paths, @lukebarnard1 found that there were
many failures to add the room as a DM against the correct user. It
turned out most of the failures seen were because the user chosen
was the current user. If the user accepted an invite it would often
be marked as with themselves because we chose the sender of the
join event as the DM user.

This fix makes the DM room setting process the same for both the
inviting client and the invited client. A RoomState.members
event causes the DM room state to be set in the room, regardless
of whether we are currently `joining` (see previous impl.)

The two cases for setting a DM are:
 - this user accepting an invite with is_direct
 - this user inviting someone with is_direct

This should handle all cases for setting DM state.
@dbkr dbkr merged commit b514600 into develop Feb 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rooms not being automatically flagged as 1:1's anymore
2 participants