refactor(sync): Rewrite simplified sliding sync #2280
Open
eleboucher
wants to merge 3 commits from
eleboucher/continuwuity:fix/sync-v5-left-rooms into main
pull from: eleboucher/continuwuity:fix/sync-v5-left-rooms
merge into: continuwuation:main
continuwuation:main
continuwuation:renovate/sentry-rust-monorepo
continuwuation:renovate/p256-0.x
continuwuation:renovate/loole-0.x
continuwuation:renovate/rust-non-major
continuwuation:renovate/rust-zerover-patch-updates
continuwuation:renovate/cargo-bins-cargo-binstall-1.x
continuwuation:nex/feat/intuitive-extremity-tracking
continuwuation:nex/feat/lockfree-event-builder
continuwuation:nex/fix/local-event-current-state
continuwuation:ginger/client-credentials
continuwuation:jade/deadlocks
continuwuation:nex/feat/notary-server
continuwuation:aranje/illegal-car-mods
continuwuation:nex/feat/admin-api
continuwuation:nex/refactor/ruma-state-res
continuwuation:jade/mass-rename
continuwuation:nex/feat/msc-fed-bidi-ping
continuwuation:nex/feat/centralise-remote-memberships
continuwuation:morgan/arm64-runner
continuwuation:renovate/argon2-0.x
continuwuation:next/meta/disable-ci-build-cache
continuwuation:fix/26.7.3
continuwuation:1235-add-arm-deb
continuwuation:nex/meta/release-schedule
continuwuation:nex/feat/pdu-versions
continuwuation:ginger/revert-direct-tls
continuwuation:nex/fix/federated-invite-revoke
continuwuation:nex/fix/plunger
continuwuation:jade/perf/gme-rebased
continuwuation:nex/perf/get-missing-events2
continuwuation:nex/backport/v0.5.11
continuwuation:nex/backport/v0.5.10-backport
continuwuation:nex/feat/msc4491-invite-reasons-in-room-creation
continuwuation:nex/feat/deprecated-room-versions
continuwuation:release/v0.5.9
continuwuation:nex/feat/enable-debug-log-release-builds
continuwuation:nex/feat/room-purging
continuwuation:nex/feat/room-shutdown
continuwuation:ginger/ruma-upstreaming
continuwuation:jade/tls-backends
continuwuation:ginger/email-fixes
continuwuation:jade/changelog-labels
continuwuation:nex/fix/v12-publishing
continuwuation:jade/build-info
continuwuation:jade/purge-sync-tokens
continuwuation:ginger/terms-and-conditions
continuwuation:ginger/remove-sliding-sync-proxy
continuwuation:nex/fix/pusher-association
continuwuation:ginger/email-support
continuwuation:jade/community-guidelines
continuwuation:nex/fix/federation-format
continuwuation:jade/git-deps-updates
continuwuation:jade/changelog-check
continuwuation:jade/rust-1-92
continuwuation:ginger/password-reset
continuwuation:nex/experiment/push-gateway-logs
continuwuation:ginger/msc3575-obliteration
continuwuation:nex/feat/block-busted-rooms
continuwuation:nex/fix/informative-startup-errs
continuwuation:ginger/no-left-room-initial-sync
continuwuation:jade/docker-entrypoint
continuwuation:jade/dehydrated-devices
continuwuation:ginger/complement-fixes
continuwuation:nex/fix/stale-destination-cache
continuwuation:nex/experiment/sync-mutex
continuwuation:tcpipuk/docker-docs
continuwuation:jade/snafu
continuwuation:jade/rand-update
continuwuation:nex/stateres-refactor
continuwuation:ginger/779-in-troubleshooting
continuwuation:jade/liveit-guide
continuwuation:jade/http3
continuwuation:nex/feat/admin-hide-empty-rooms
continuwuation:ginger/oobe
continuwuation:nex/fix/debian-thingy
continuwuation:jade/ldap-admin-check
continuwuation:nex/fix/remote-restricted-joins
continuwuation:nex/feat/msc4406-sender-ignored
continuwuation:jade/deadlock-detection
continuwuation:jade/get-started
continuwuation:jade/docs-guide
continuwuation:ginger/fix-local-invites
continuwuation:nex/fix/tpi
continuwuation:nex/feat/room-deletion
continuwuation:nex/feat/msc4322-media-redaction
continuwuation:ginger/stitched-order
continuwuation:ginger/deps/update-rspress
continuwuation:jade/admin-announce-improvements
continuwuation:ginger/xtask-improvements
continuwuation:jade/improve-admin-config-display
continuwuation:nex/fix/better-stateres-error-logs
continuwuation:jade/sender-timeouts
continuwuation:nex/feat/custom-v12-room-ids
continuwuation:ginger/update-metadata
continuwuation:nex/feat/admin-force-logout
continuwuation:tom/max-perf-docs
continuwuation:nex/fix/invalid-appservice-reg
continuwuation:nex/feat/antispam
continuwuation:nex/feat/account-locking
continuwuation:jade/logging-cleanup
continuwuation:jade/remove-legacy-appservice-auth
continuwuation:nex/fix/key-query
continuwuation:jade/update-prek
continuwuation:nex/fix/room-summaries
continuwuation:ginger/restrict-admin-commands
continuwuation:ginger/enable-console-by-default
continuwuation:jade/tag-fixes
continuwuation:jade/otlp
continuwuation:nex/meta/pull-req-template
continuwuation:nex/fix/fed-invite-compliance
continuwuation:nex/feat/build-commit
continuwuation:nex/feat/join-logging
continuwuation:jade/mailmap-updates
continuwuation:jade/hack-ci-tmp
continuwuation:jade/v12-stable
continuwuation:jade/relations
continuwuation:ginger/database-refactor
continuwuation:jade/fix-ldap-uiaa
continuwuation:nex/fix/validation
continuwuation:ginger/nuke-invalid-msc4133-fields-in-migration
continuwuation:ginger/downgrade-artifact-actions
continuwuation:oddlid/reload-fix
continuwuation:jade/fix-assert
continuwuation:ginger/sync-v3-cleanup
continuwuation:ginger/remove-absolute-action-urls
continuwuation:jade/website
continuwuation:nex/fix/backoff
continuwuation:ginger/fix-mdbook-for-0.5
continuwuation:ginger/no-docker-on-prs
continuwuation:backport/v0.5.0-rc.8-1
continuwuation:nex/fed-improvements
continuwuation:jade/rust-1.90
continuwuation:jade/mirror-dockerhub
continuwuation:jade/clippy-fixes
continuwuation:jade/fix-support
continuwuation:jade/clean-images
continuwuation:jade/wal-compression-type
continuwuation:jade/flake-clone
continuwuation:ginger/upload-rpms-on-schedule
continuwuation:nex/fix/incoming-fetch
continuwuation:nex/fix/upgrade
continuwuation:tom/ci-fedora-rpm
continuwuation:jade/ci-release-fix
continuwuation:jade/rocksdb-10-5
continuwuation:ginger/fix-msc4133-migration
continuwuation:ginger/migrate-busted-tz
continuwuation:hydra/public
continuwuation:nex/feat/manual-extremities
continuwuation:nex/feat/async-media
continuwuation:nex/feat/fast-joins-hack-do-not-use-DO-NOT-USE
continuwuation:nex/feat/better-logging
continuwuation:trigger-ci-so-latest-isnt-on-illegal-car-mods
continuwuation:nex/feat/pins-backfill
continuwuation:jade/tuwunel-2025-06-old
continuwuation:jade/ai-slop-db-docs
continuwuation:nex/fix-create-auth
continuwuation:jade/version-stats
continuwuation:jade/read-receipts
continuwuation:jade/rust-toolchain-no-targets
continuwuation:jade/logging-features
continuwuation:jade/syncv5-typing
continuwuation:jade/msc2815
continuwuation:morguldir/see-eye
continuwuation:jade/css-small-screen
continuwuation:nex/wip-751
continuwuation:tuwunel-rebase
continuwuation:test
continuwuation:oddlid/rename-admin-room-bot
continuwuation:strawberry/nix-ci-stuff
continuwuation:strawberry/valgrind
continuwuation:phonemain
continuwuation:strawberry/morgs-snake-sync-jason-main
continuwuation:newer-media-endpoints
continuwuation:folly-coroutines-async-io
continuwuation:federation-retry-timer-port
continuwuation:bad-attempt-at-extracting-homeserver-signing-key
continuwuation:room-deletion-attempt-do-not-use
No reviewers
Labels
Clear labels
Abandoned
This pull request appears to be abandoned by its author.
Blocked
This pull request or issue is currently blocked from being merged/closed
Bug
Something isn't working as intended
Changelog
Added
Changelog entry added
Changelog
Missing
No changelog when one is needed
Changelog
None
Changelog is unnecesary for this change
Cherry-picking
Commits picked from other conduit projects
Database
This requires or includes changes to the database
Dependencies
Something dependency related
Dependencies/Renovate
Automatic dependency upgrades by Renovate
Difficulty
Easy
Low difficulty to implement - touches few parts of the codebase, low complexity
Difficulty
Hard
High difficulty to implement - touches many parts of the codebase, high complexity
Difficulty
Medium
Medium difficulty to implement - touches more parts of the codebase, higher complexity
Documentation
Improvements or additions to documentation
Enhancement
New feature or request
Good first issue
Good for newcomers
Help wanted
Additional eyes and keyboards are required for this one
Inherited
Issues that have been inhereted from the project pre-fork
Matrix/Administration
Features pertaining to homeserver administration
Matrix/Appservices
Features pertaining to the appservice API
Matrix/Auth
Features pertaining to authentication
Matrix/Client
Features pertaining to client-to-server interactions
Matrix/Core
Issues relating to core matrix functionality, such as state resolution and PDU formats
Matrix/E2EE
Issues related to end to end encryption
Matrix/Federation
Features pertaining to server-to-server interactions
Matrix/Hydra
Issues related to room version 12 and related changes (temporary label)
Matrix/MSC
Features pertaining to unstable matrix features
Matrix/Media
Features pertaining to media interactions
Matrix/T&S
Changes or issues related to trust & safety tooling
Merge
This PR is ready to be merged
Merge/Manual
This PR should be manually merged
Merge/Squash
This PR should be squashed when it is merged
Meta
Related to housekeeping, maintenance, or other repo-meta.
Meta/CI
Issues related to CI changes
Meta/Packaging
Packaging
Priority
Blocking
This issue is blocking the next release
Priority
High
This issue is very important
Priority
Low
This issue is of a rather low priority
Security
This item is related to general security
Status
Confirmed
This issue has enough information and is confirmed
Status
Duplicate
This issue or pull request already exists
Status
Invalid
This issue doesn't seem right
Status
Needs Investigation
This issue needs further investigation
Support
Questions or support requests
bob the builder
pdu logic rewrite starring nexus nicholson
No labels
Abandoned
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Merge
Merge/Manual
Merge/Squash
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
bob the builder
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set
Reference
continuwuation/continuwuity!2280
Loading…
Reference in a new issue
No description provided.
Delete branch "eleboucher/continuwuity:fix/sync-v5-left-rooms"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Rewrites the sliding sync endpoint to follow the merged MSC4186 and its extension MSCs, keeping the unstable wire format current clients speak.
required_stateis sent as a delta, with MSC4186 lazy-loading rules ($LAZY/$MEmapped from the unstable format)is_dm,bump_stampfor invites and new rooms, and heroes follow the MSC/messagestokens; connection state is boundedTested with Complement (same as
main) and matrix-rust-sdk's integration suite (46 passed vs 41 onmain, no regressions).Pull request checklist:
mainbranch, and the branch is named something other thanmain.myself, if applicable. This includes ensuring code compiles.
637ba1764be5bb1f06fae5bb1f06fa20c7b32008I'm getting a sense of de-ja-vu here. These don't exist: #1533, #1661, #1690, #2237.
Given they used to exist, I have to ask, does this actually implement MSC4186 as merged, or does it implement a compatibility hybrid that will break when clients update to their next set of quirks next week, requiring another refactor?
@nex wrote in #2280 (comment):
yes sorry i removed it i forgot to update the description my local matrix spec was out of date
Ah makes sense. Second comment still stands though, is this implemented per the latest revision of the MSC?
@nex wrote in #2280 (comment):
It implements MSC4186's server semantics as merged (connection state, room inclusion, required_state deltas and lazy-loading rules, left/kicked/banned rooms, extension scoping), but on the unstable org.matrix.simplified_msc3575 wire format. Because the sdk's still use the the unstable. When clients move to v4, supporting it is a request/response adapter over the same core, not another rewrite. The compatibility shims are documented in the code and limited to the unstable format: unread counts, sticky parameters, and conn_id-less subscriptions for js-sdk.
@ -0,0 +68,4 @@.update_device_last_seen(syncing_user, Some(syncing_device), client_ip).await;// MSC3575's way of dropping subscriptions, which ruma does not modelWhat's this doing here? We don't care to support MSC3575.
removing it, it just that the javascript sdk still wait for some stuff for this MSC
okay awesome, works for me, thanks!
20c7b32008958e85cea2refactor(sync): Rewrite simplified sliding syncto fix(pusher): Unify retry backoff and fix proxied or LAN push gatewaysfix(pusher): Unify retry backoff and fix proxied or LAN push gatewaysto refactor(sync): Rewrite simplified sliding sync958e85cea270061f680f70061f680f634d44c64e634d44c64e5efd5e9a115efd5e9a11da7a22c01e3fd08aa593d99f9fa9fdJust clearing old partial review, pls ignore (why doesnt forgejo have a way to do this lol)
support for MSC4559 as is blocking impl. of the Presence v2 MSCs in SNext would be cool as well :)
For the sake of getting this PR over the review line given our current limited bandwidth I think it's fair to ask that it doesn't have its scope increased - a follow-up PR is always welcome
This PR is overall very complicated, poorly documented, and has a plethora of codestyle issues. Frankly, I think it might be a better idea to break this PR down into several smaller PRs so that changes can be merged incrementally, starting with the core sliding-sync implementation, and then one PR per extension.
Just for the record: this took me 2.5hrs to review
@ -184,2 +220,4 @@.await}/// `None` if nothing happened in the room since `count`.This docstring doesn't actually describe anything about the function (the first sentence of a doc string at the very least should summarise what the function does)
@ -185,1 +221,4 @@}/// `None` if nothing happened in the room since `count`.async fn shortstatehash_after(nit:
shortstatehash_after_countwould be more a intuitive name@ -186,0 +252,4 @@.map_err(|err| err!("PDU after count has no shortstatehash: {err}"))}/// `state_events` are the room's state changes in the range.This docstring doesn't actually describe anything about the function (the first sentence of a doc string at the very least should summarise what the function does)
@ -0,0 +11,5 @@use super::{SyncContext, scope, scope_update};use crate::client::sync::v5::lists::RoomSelection;/// MSC4548: a room entering the scope for the first time gets all of its/// account data.nit: references to an MSC should include a link to said MSC, either hyperlinked or referenced
@ -0,0 +19,4 @@v5::room::added_state,};/// MSC4543: device lists are only sent once the client has a position.nit: references to an MSC should include a link to said MSC, either hyperlinked or referenced
@ -0,0 +139,4 @@.await}async fn room_device_list_changes(How does this differ from mod.rs' function of the same name? (might be worth noting that in a comment or docstring)
@ -0,0 +65,4 @@}/// MSC4508: rooms in range of the named lists and the named subscriptions,/// all of either by default.nit: references to an MSC should include a link to said MSC, either hyperlinked or referenced
@ -0,0 +66,4 @@/// MSC4508: rooms in range of the named lists and the named subscriptions,/// all of either by default.fn scope(What does this actually do? The docstring doesn't explain it very well and the function body itself is match soup
@ -0,0 +104,16 @@scope}/// A disabled extension forgets its scope, so enabling it again starts over.fn scope_update(context: SyncContext<'_>,previous: &ExtensionScope,enabled: bool,scope: HashSet<OwnedRoomId>,) -> Option<ExtensionScope> {if !enabled {return previous.enabled.then(ExtensionScope::default);}previous.advance(scope, context.since())}Does this need to be a function? it looks small enough to inline to me
@ -0,0 +17,5 @@room::{BuiltRooms, SentTimeline},};/// A room entering the scope only gets the receipts for its returned timeline/// and the user's own, rather than one for every member.This docstring is written more like a comment for a specific condition rather than describing what the function does
@ -0,0 +92,7 @@read_receipt.readreceipts_since(room_id, Some(scan_from)).ready_filter(|(read_user, count, receipt)| {(!entering && *count > since)|| (read_user != syncing_user&& sent_timeline.is_some_and(|timeline| receipts_any(receipt, &timeline.event_ids)))this should probably be un-nested because it's hard to follow
@ -0,0 +22,5 @@const DEFAULT_LIMIT: usize = 100;/// MSC4480 covers every joined room a list or subscription matches, including/// rooms outside the lists' ranges.nit: references to an MSC should include a link to said MSC, either hyperlinked or referenced
This docstring also doesn't really describe what the function actually does
@ -0,0 +71,4 @@let found: Vec<_> = joined_rooms.into_iter().stream().wide_then(async |room_id| {nit: This closure is pretty long, it probably wants making into a real function
@ -0,0 +164,4 @@push_sticky_event(services, &mut response, syncing_user, room_id, pdu).await;}// MSC4480 requires it, and it keeps the next request from scanning againnit: "it"?
@ -0,0 +211,4 @@services: &Services,context: SyncContext<'_>,) -> (Vec<(OwnedRoomId, MembershipState, Option<u64>)>,nit: This tuple probably wants to be a named type
@ -0,0 +300,4 @@.map_or(MembershipState::Leave, |content| content.membership)}async fn candidate(This looks like a complication function and should probably have a docstring explaining what it does
@ -0,0 +346,4 @@}}/// Invalid `m.direct` data counts as no DMs rather than failing every sync.This is probably more of a comment than a docstring
@ -0,0 +385,5 @@.is_some()}/// Stripped state is only recommended to carry `m.room.create`, so a room/// without one is treated as untyped rather than hidden from every list.what? Also I think this is supposed to be a comment(?) instead of a docstring
@ -0,0 +417,6 @@}}fn is_stripped(membership: &MembershipState) -> bool {matches!(membership, MembershipState::Invite | MembershipState::Knock)}This doesn't need to be a function
@ -0,0 +429,7 @@event_type: &StateEventType,) -> Option<Raw<AnyStrippedStateEvent>> {let state_cache = &services.rooms.state_cache;let state = match membership {| MembershipState::Knock => state_cache.knock_state(user_id, room_id).await,| _ => state_cache.invite_state(user_id, room_id).await,};This could be an if/else instead of match
@ -0,0 +444,5 @@})}/// Rooms the user left are visible even if they never joined, e.g. after/// rejecting an invite.This docstring doesn't describe what this function actually does
@ -0,0 +498,10 @@let is_invite = candidate.membership == MembershipState::Invite;let type_filtered = !filters.room_types.is_empty() || !filters.not_room_types.is_empty();matches_bool_filter(candidate.is_dm, filters.is_dm)&& matches_bool_filter(candidate.is_encrypted, filters.is_encrypted)&& matches_bool_filter(is_invite, filters.is_invite)&& (!type_filtered|| candidate.room_type.as_ref().is_some_and(|room_type| {matches_room_type(room_type, &filters.room_types, &filters.not_room_types)}))This is a really complication calculation and should probably be un-nested for readabilty
@ -0,0 +507,6 @@}))}fn matches_bool_filter(value: bool, filter: Option<bool>) -> bool {filter.is_none_or(|expected| value == expected)}This doesn't need to be a function
@ -0,0 +511,11 @@filter.is_none_or(|expected| value == expected)}fn matches_room_type(room_type: &RoomTypeFilter,room_types: &[RoomTypeFilter],not_room_types: &[RoomTypeFilter],) -> bool {!not_room_types.contains(room_type)&& (room_types.is_empty() || room_types.contains(room_type))}This doesn't need to be a function imo
@ -0,0 +520,11 @@&& (room_types.is_empty() || room_types.contains(room_type))}fn sort_by_activity(candidates: &mut [Candidate]) {candidates.sort_unstable_by(|left, right| {right.activity.cmp(&left.activity).then_with(|| left.room_id.cmp(&right.room_id))});}Is this actually referenced in multiple places? It doesn't need to be a function if not
@ -0,0 +529,4 @@});}#[allow(clippy::single_range_in_vec_init, reason = "these are lists of index ranges")]This should go below the docstring
@ -0,0 +531,4 @@#[allow(clippy::single_range_in_vec_init, reason = "these are lists of index ranges")]/// The disjoint index ranges a list's inclusive `[start, end]` ranges cover./// MSC4186: without ranges the list holds every matching room.nit: references to an MSC should include a link to said MSC, either hyperlinked or referenced
@ -0,0 +22,4 @@};use crate::{Ruma, client_ip::ClientIp};const MAX_TIMEOUT: Duration = Duration::from_secs(30);Why 30 seconds? Is this actually specced?
@ -0,0 +27,4 @@/// A response that takes this long to build is reported at `info`.const SLOW_BUILD: Duration = Duration::from_millis(100);/// MSC4186 allows at most this many lists and room subscriptions; the samenit: references to an MSC should include a link to said MSC, either hyperlinked or referenced
@ -0,0 +25,4 @@const MAX_TIMEOUT: Duration = Duration::from_secs(30);/// A response that takes this long to build is reported at `info`.const SLOW_BUILD: Duration = Duration::from_millis(100);100ms is a low threshold for large accounts 🤔
@ -0,0 +121,15 @@let (mut response, update) = build_response(services, context).await?;// a changed list count is news even without room data, and clients// replenish their one-time keys as soon as the counts move, and send// encryption requests between syncs of a connection without roomslet respond = !is_empty(&response)|| update.list_counts.is_some()|| match timeout_at(deadline, wake.woken()).await {| Ok(Some(woken)) => {debug!(conn_id = ?request.conn_id, ?woken, "sliding sync woken");!has_rooms(&request) || woken.contains(&WakeKind::Keys)},| Ok(None) | Err(_) => true,};This is a complicated calculation that could probably just do with being split up
@ -0,0 +172,6 @@.collect()}fn has_rooms(request: &v5::Request) -> bool {!request.lists.is_empty() || !request.room_subscriptions.is_empty()}This doesn't need to be a function
@ -0,0 +260,4 @@/// `phases` are the elapsed times after selecting rooms, building them and/// building the extensions.fn log_build(context: SyncContext<'_>, rooms: usize, phases: [Duration; 3]) {Given this is only interesting for debug builds, it might be a good idea to feature-gate this behind debug_assertions
@ -0,0 +170,4 @@.await}/// `None` if the room must be sent in full.This isn't a helpful docstring
@ -0,0 +172,4 @@/// `None` if the room must be sent in full.fn since(previous: Option<&RoomState>, selected: &SelectedRoom) -> Option<u64> {let previous = previous?;Why not just make this function take an &RoomState and just not call it if the value would be None?
@ -0,0 +182,4 @@(comparable && !selected.config.expands(&previous.config)).then_some(previous.sent_at)}fn room_update(Vague function name lacking a docstring
@ -0,0 +375,4 @@if join_pdu.get_content::<RoomMemberEventContent>().is_ok_and(|content| content.membership != MembershipState::Join)I think if this fails to deserialise, the user is implicitly just allowed to see history since the bad membership event?
@ -0,0 +396,9 @@build_timeline_room(services, context, room_id, config, since, view).await}fn leave_only(since: Option<u64>, leave_pdu: PduEvent) -> v5::response::Room {assign!(v5::response::Room::new(), {initial: Some(since.is_none()),required_state: vec![leave_pdu.into_format()],})}I don't think this needs to be a function
@ -0,0 +531,4 @@required_state.push(leave);}// clients drop their pagination token without onewithout one what?
@ -163,3 +163,4 @@type Err = Error;fn from_str(token: &str) -> Result<Self, Self::Err> { Ok(Self::from_signed(token.parse()?)) }/// Also accepts a sliding sync `pos`, which MSC4186 lets clients paginate/// from; its count comes before the `_`.This docstring seems partial/incomplete?
@ -0,0 +10,4 @@use super::RoomConfig;/// Responses a client may still acknowledge after it was sent a newer one.const MAX_PENDING: usize = 8;why eight? I thought the proposal said this was immediate?
@ -0,0 +73,5 @@pub typing: Option<ExtensionScope>,}/// The sequence number keeps a retried request from committing a response the/// client never received, even when the stream count has not moved.Shouldn't this be on the doc for the seq property?
@ -0,0 +154,4 @@}}/// Returns false unless `pos` is current or still pending.What does this function do though? (bad docstring)
@ -0,0 +6,5 @@const MAX_TIMELINE_LIMIT: usize = 100;const WILDCARD: &str = "*";const LAZY: &str = "$LAZY";const ME: &str = "$ME";These were removed ages ago, I thought you said this was built based on the merged spec proposal?
@ -0,0 +65,8 @@let event_type = (event_type.to_string() != WILDCARD).then(|| event_type.clone());let state_key = match state_key.as_str() {| WILDCARD => StateKeyPattern::Any,| ME => StateKeyPattern::Me,| LAZY if event_type == Some(StateEventType::RoomMember) => {this.lazy_members = true;continue;},Again these don't exist
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.