Skip to content

feat(event cache): return relations in their local ordering #5258

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

Draft
wants to merge 11 commits into
base: bnjbvr/linked-chunk-ordering
Choose a base branch
from

Conversation

bnjbvr
Copy link
Member

@bnjbvr bnjbvr commented Jun 19, 2025

This makes it so that the relations returned by RoomEventCache::event_with_relations are now sorted by their position in the linked chunk, if available (events that can't be located in a linked chunk will be at the front of the array, as they might be "bundled" relations they should be handled in priority).

This will make it possible, for a threaded timeline, to retrieve all related edits in a thread, and to correctly order them (if we've seen them in the main linked chunk first).

(In the meantime, we could even use it to include the edit to a latest thread event as the latest event 👀 Will look into that as a separate PR.)

On top of #5225. Part of #4869 / #5122.

@bnjbvr bnjbvr changed the title feat(event cache): retrieve relations in their local feat(event cache): return relations in their local ordering Jun 19, 2025
@bnjbvr bnjbvr force-pushed the bnjbvr/load-related-events-with-position branch from ec3a8cd to f8321ca Compare June 19, 2025 14:03
@bnjbvr bnjbvr force-pushed the bnjbvr/linked-chunk-ordering branch from 68d7da4 to 5a55d8b Compare June 26, 2025 11:21
@bnjbvr bnjbvr force-pushed the bnjbvr/load-related-events-with-position branch from f8321ca to d268712 Compare June 26, 2025 13:19
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 this pull request may close these issues.

1 participant