Skip to content

sync: bound sliding sync receipts and typing by membership - #730

Open
basnijholt wants to merge 1 commit into
matrix-construct:mainfrom
mindroom-ai:upstream-sync-ephemeral-membership
Open

basnijholt wants to merge 1 commit into
matrix-construct:mainfrom
mindroom-ai:upstream-sync-ephemeral-membership

Conversation

@basnijholt

Copy link
Copy Markdown
Contributor

What does this PR do?

The sliding sync typing and receipts extensions collected data for every room in the response, including rooms the user is not in. Users who were invited, had left, or never joined could see who is typing and live public receipts.

Live typing is now collected only for joined or peeking users. The same gate applies to live public receipts, but a former member keeps receipts up to their retained departure, so departure-time extensions are not dropped wholesale. Private receipts and account data are unchanged.

Found through MindRoom. Fork change: mindroom-ai/mindroom-tuwunel#28.

Tests:

  • sync::v5::extensions::tests::only_joined_and_peeking_rooms_carry_live_typing and receipt cutoff cases. They fail without the fix (typing and receipts after departure are returned).

Validation:

  • Nightly rustfmt (nightly-2026-11-03): cargo fmt --all -- --check passes.
  • cargo clippy --offline --locked on the touched crates with --all-targets --all-features -- -D warnings passes.
  • cargo test -p tuwunel_api_client --lib: 176 passed, plus six related integration tests, including retention of receipts from before the departure.
  • Complement was not run.

Checklist

  • Code is formatted with nightly cargo fmt and satisfies clippy and rustc lints; any allowed lint is justified by an obvious reason or a comment.
  • Complement compliance changes (new passes or new failures), if any, are noted in the description above.
  • Config option changes were made in src/core/config/mod.rs doc comments and the regenerated tuwunel-example.toml is committed. (No config changes.)
  • User-facing changes are reflected in docs/. (No user-facing docs change.)
  • I agree that my changes may be licensed under the Apache-2.0 licence and my conduct is in line with the Contributor's Covenant and Tuwunel's Code of Conduct.

Only collect live typing for joined or peeking users. Apply the same
gate to live public receipts, but keep receipts through the retained
departure of a former member. Private receipts and account data are
unchanged.

Assisted-by: MindRoom DevAgent:openai/gpt-6.2-astra <https://github.com/mindroom-ai/mindroom>

This branch has not been deployed

No deployments
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