-
Notifications
You must be signed in to change notification settings - Fork 393
Add experimental support for MSC4360: Sliding Sync Threads Extension #19005
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
base: develop
Are you sure you want to change the base?
Conversation
) -> JsonDict: | ||
"""Get related events of a event, ordered by topological ordering. | ||
TODO Accept a PaginationConfig instead of individual pagination parameters. |
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 has been done alread, the comment just wasn't updated.
WHERE EXISTS ( | ||
SELECT 1 | ||
FROM room_memberships AS rm | ||
WHERE rm.room_id = threads.room_id | ||
AND rm.user_id = ? | ||
AND rm.event_stream_ordering <= threads.stream_ordering | ||
AND rm.membership = ? | ||
AND NOT EXISTS ( | ||
SELECT 1 | ||
FROM room_memberships AS rm2 | ||
WHERE rm2.room_id = rm.room_id | ||
AND rm2.user_id = rm.user_id | ||
AND rm2.event_stream_ordering > rm.event_stream_ordering | ||
AND rm2.event_stream_ordering <= threads.stream_ordering | ||
) | ||
) |
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 think this does what the comment says. That is to check if there exists a "join" membership event for this user in this room that is the latest membership event prior to the thread event stream_ordering.
Implements: matrix-org/matrix-spec-proposals#4360
Disclaimer: I used Claude Code in a consultative manner to assist with parts of this PR.
I used it mainly for considering options for the SQL query and to generate test cases.
Pull Request Checklist
EventStore
toEventWorkerStore
.".code blocks
.