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

Small sliding sync refactorings #2956

Merged
merged 3 commits into from
Dec 18, 2023
Merged

Small sliding sync refactorings #2956

merged 3 commits into from
Dec 18, 2023

Conversation

bnjbvr
Copy link
Member

@bnjbvr bnjbvr commented Dec 18, 2023

Extracted from #2953.

- We can look up the session meta only once, it's not useful to do it once per event as it's
loop-invariant.
- We can look at the events backwards and stop after the first room membership event we see
in that order.
The room_info variable in this function contains the latest_event, and later it's set as the Room's room info (`inner.inner`) field.
Calling `set_latest_event` manually here will cause an update of the `RoomInfo` subscriber, while we're not done processing the full
room, and a room info update will happen anyways later (when the entire room is processed), so this one is spurious and will only
show a partial update of the fields.
@bnjbvr bnjbvr requested a review from a team as a code owner December 18, 2023 14:34
@bnjbvr bnjbvr requested review from jplatte and removed request for a team December 18, 2023 14:34
Copy link
Member

@Hywan Hywan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@bnjbvr bnjbvr enabled auto-merge (rebase) December 18, 2023 14:43
Copy link

codecov bot commented Dec 18, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f5fb44b) 83.50% compared to head (d969da9) 83.50%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2956      +/-   ##
==========================================
- Coverage   83.50%   83.50%   -0.01%     
==========================================
  Files         221      221              
  Lines       23009    23007       -2     
==========================================
- Hits        19214    19211       -3     
- Misses       3795     3796       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bnjbvr bnjbvr merged commit 320b868 into main Dec 18, 2023
35 checks passed
@bnjbvr bnjbvr deleted the slidingsync-refactorings branch December 18, 2023 14:47
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.

2 participants