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

Supress membership field on MSC4115 #421

Closed
kegsay opened this issue Apr 16, 2024 · 0 comments · Fixed by #423
Closed

Supress membership field on MSC4115 #421

kegsay opened this issue Apr 16, 2024 · 0 comments · Fixed by #423

Comments

@kegsay
Copy link
Member

kegsay commented Apr 16, 2024

Part of element-hq/element-meta#2317

Servers that support MSC4115 will be sending down a new key unsigned.membership that represents:

the membership of the user making the request, according to the state of the room at the time of the event being returned

This is incompatible with sliding sync's current architecture, which deduplicates events in the events table. This means Alice could receive the event first, with unsigned.membership representing Alice's membership, and then we could serve that same event to Bob. This results in sliding sync lying about this value to clients. We should ensure that we strip this key for now.

Longer term, we need to add a new table to track this membership value for each user for each event and then repopulate it when the user connects to the proxy.

kegsay added a commit that referenced this issue Apr 24, 2024
With integration tests. This is required because this field
is scoped per-v2-user, but because the proxy deduplicates events
it means we might see the membership value for a different user.
We can't set this field correctly as we lack that information, so
rather than lie to clients instead just delete the field.

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

Successfully merging a pull request may close this issue.

1 participant