Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native sliding sync: add membership field to rooms #17838

Open
jmartinesp opened this issue Oct 16, 2024 · 1 comment
Open

Native sliding sync: add membership field to rooms #17838

jmartinesp opened this issue Oct 16, 2024 · 1 comment
Labels

Comments

@jmartinesp
Copy link
Member

jmartinesp commented Oct 16, 2024

Description:

At the moment, to check if a room is a joined, invited or knocked one we need to do something like:

Does it have invite_state?

  1. Yes: it can be either an invited or knocked room. We need to check the membership state event for our user, if any.
    1.1. There is a knocked membership event: it's a knocked room.
    1.2. There is either an invite membership event: it's an invite.
    1.3. No membership event, or an invalid one: assume it's an invite and there was some server error.
  2. No: assume it's a joined room.

That's kind of complex, it assumes several cases when we're not sure how to proceed and doesn't detail how we should differentiate between a joined room and a room with a left, kicked or banned membership (apparently, this would be another membership event check on branch 2 above).

We've discussed in chats a couple of times adding some membership field to the rooms so it's the server that tells us which membership we have in the room instead of the client having to make the decisions: it would simplify the work for clients a lot and also make sure we have consistent results between clients.

I'm adding this issue so we keep track of this suggestion.

@MadLittleMods
Copy link
Contributor

MadLittleMods commented Oct 16, 2024

Sounds good to me. I was also tempted to add this field myself while implementing 👍

It would be good to re-add your MSC comment as a discussion on the diff so people can discuss the idea in a resolvable thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants