-
Notifications
You must be signed in to change notification settings - Fork 212
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
Sliding Sync: when using $LAZY
always send down all members for non-gappy syncs
#17929
Comments
Probably related issue on EXA : element-hq/element-x-android#3790 |
@erikjohnston When does this happen? If someone changes their display name for example, the membership state event will show up in the timeline. And if the membership change happened outside of the range of the Is this targeting a scenario where some state comes over federation from some time ago which updates the current state but isn't in the timeline? (not sure this is even a thing because it will still get a recent
@ganfra What's your exact theory for how this problem contributes to that issue? |
To clarify this a bit: the original reported issue was:
Technically, this could be also solved by processing the state events in the timeline, but since those are not guaranteed to be up to date it could easily lead to inconsistencies in the clients. |
@jmartinesp Perfect description! That makes a lot more sense 👌 So basically, we just need to fill in this synapse/synapse/handlers/sliding_sync/__init__.py Lines 958 to 961 in 80e39fd
I've made the changes with some tests in #17947 🚀
Correct choice 👍 Only rely on what the homeserver is telling you through |
#17947 has been merged which should unblock the ElementX knocking use case 🚀 @erikjohnston highlighted that we should also handle membership changes from state reset scenarios (where the membership might change without a corresponding event). We can fix that up in a separate PR. #17732 is probably a prerequisite since it fixes up some spots where we forgot to bust the I won't be able to tackle this right away given other priorities. |
… room members (element-hq#17947) Part of element-hq#17929
Currently,
$LAZY
only sends down membership events for senders of events in the timeline (if the membership hasn't previously been sent down). In particular, that means if a user's state changes and it is not in the timeline, then the client won't know the membership state has changed / been invalidated.To make things easier for clients, lets change
$LAZY
to also send down all membership changes in non-gappy syncs (i.e. whenlimited: false
). This allows clients to cache the membership list for as long as it doesn't get a gappy sync, but still ensures for large gaps the server doesn't need to send down all membership changes.The text was updated successfully, but these errors were encountered: