Skip to content

fix(sdk): Client::sync_once defaults to reuse previous token #5522

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

Merged
merged 5 commits into from
Aug 14, 2025

Conversation

dragonfly1033
Copy link
Contributor

@dragonfly1033 dragonfly1033 commented Aug 12, 2025

Fixes #1835.

Introduces a new SyncToken enum for the SyncSettings::token field.
The enum has 3 variants: ReusePrevious (default), NoToken, Specific(String).

Some tests were changed to use the old default (NoToken).

Signed-off-by: Shrey Patel [email protected]

@dragonfly1033 dragonfly1033 requested a review from a team as a code owner August 12, 2025 15:53
@dragonfly1033 dragonfly1033 requested review from andybalaam and removed request for a team August 12, 2025 15:53
Copy link

codspeed-hq bot commented Aug 12, 2025

CodSpeed Performance Report

Merging #5522 will not alter performance

Comparing dragonfly1033/sync-once (f69b2cb) with main (1ffc014)

Summary

✅ 31 untouched benchmarks

Copy link

codecov bot commented Aug 12, 2025

Codecov Report

❌ Patch coverage is 58.33333% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.57%. Comparing base (6c944a9) to head (f69b2cb).
⚠️ Report is 38 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
crates/matrix-sdk/src/config/sync.rs 54.54% 5 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5522   +/-   ##
=======================================
  Coverage   88.57%   88.57%           
=======================================
  Files         339      339           
  Lines       93627    93635    +8     
  Branches    93627    93635    +8     
=======================================
+ Hits        82927    82937   +10     
+ Misses       6565     6562    -3     
- Partials     4135     4136    +1     

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

@bnjbvr bnjbvr changed the title fix(sdk): Client::sync_once defualts to reuse previous token fix(sdk): Client::sync_once defaults to reuse previous token Aug 13, 2025
Copy link
Member

@bnjbvr bnjbvr left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for fixing this! Can you add an entry in the matrix_sdk's CHANGELOG.md, please? (in the refactor section, with an annotation that it's a breaking change)

@bnjbvr bnjbvr removed the request for review from andybalaam August 13, 2025 08:05
Copy link
Member

@bnjbvr bnjbvr left a comment

Choose a reason for hiding this comment

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

Just missing a CHANGELOG.md entry, and we'll be good to go 🥳

Signed-off-by: dragonfly1033 <[email protected]>
Copy link
Member

@bnjbvr bnjbvr left a comment

Choose a reason for hiding this comment

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

Thank you 🥳

@bnjbvr bnjbvr merged commit 1201be4 into main Aug 14, 2025
49 of 50 checks passed
@bnjbvr bnjbvr deleted the dragonfly1033/sync-once branch August 14, 2025 10:14
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.

sync_once does not use client.sync_token
3 participants