Skip to content

Combine crypto-related receiveSyncChanges calls into one - #5503

Merged
kaylendog merged 5 commits into
developfrom
kaylendog/fix/single-sync
Sep 1, 2026
Merged

kaylendog merged 5 commits into
developfrom
kaylendog/fix/single-sync

Conversation

@kaylendog

@kaylendog kaylendog commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

matrix-org/matrix-rust-sdk#6780 fixed a long-standing issue in the Rust SDK where OlmMachine::receive_sync_changes incorrectly treated a missing one_time_keys_counts as "no change", when (for sync v2) this means "no keys". This behaviour made it into the WASM SDK in release v18.5.0, which causes clients written using the JS SDK to endlessly upload OTKs on every sync.

This is resolved by this PR by correctly calling either OlmMachine.receiveSyncChanges or the new OlmMachine.receiveSyncChanges once per sync, as opposed to the three calls previously made by preprocessToDeviceMessages, processDeviceLists, and processKeyCounts.

Fixes #5501

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • Sign-off given on the changes (see CONTRIBUTING.md).

@uhoreg uhoreg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks pretty good so far. I assume that the sliding-sync-sdk.ts changes will be updated to use matrix-org/matrix-sdk-crypto-wasm#345

@uhoreg uhoreg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks plausible

@kaylendog
kaylendog added this pull request to the merge queue Sep 1, 2026
Merged via the queue into develop with commit 7fab9fa Sep 1, 2026
50 checks passed
@kaylendog
kaylendog deleted the kaylendog/fix/single-sync branch September 1, 2026 09:07

This branch was successfully deployed

1 active deployment
PR Documentation Preview — 92ec56ae Deployed Aug 28, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

3 participants