-
Notifications
You must be signed in to change notification settings - Fork 222
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: Reset forgotten
status when membership changes (like rejoining a room)
#17835
Sliding Sync: Reset forgotten
status when membership changes (like rejoining a room)
#17835
Conversation
# XXX: Is this how we actually want it to behave? It seems like ideally, the | ||
# room forgotten status should only be reset when the user decides to join again | ||
# (or is invited/knocks). This way the room remains forgotten for any ban/leave | ||
# transitions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a future task in any case but thought this current behavior is a bit weird.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I think we can simplify the BG update a bit though.
synapse/storage/schema/__init__.py
Outdated
@@ -19,7 +19,7 @@ | |||
# | |||
# | |||
|
|||
SCHEMA_VERSION = 88 # remember to update the list below when updating | |||
SCHEMA_VERSION = 89 # remember to update the list below when updating |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to bump the schema version. We only need to do so if we want to rely on schema delta having happened.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted. I assume we will want to describe the changes when we do bump it eventaully so I've left the description in Changes in SCHEMA_VERSION = 89
below
We don't need to rely on the background update happening so no need to bump it See #17835 (comment)
Thanks for the review and merge @erikjohnston 🦙 |
Reset
sliding_sync_membership_snapshots
->forgotten
status when membership changes (like rejoining a room).Fix #17781
What was the problem before?
Previously, if someone used
/forget
on one of their rooms, it would updatesliding_sync_membership_snapshots
as expected but when someone rejoined the room (or had any membership change), the upsert didn't overwrite and reset theforgotten
status so it remainedforgotten
and invisible down the Sliding Sync endpoint.(downside of having two sources of truth)
Todo
Pull Request Checklist
EventStore
toEventWorkerStore
.".code blocks
.(run the linters)