From c9a435ab34ce4d888f4859244fd0db9914b87d23 Mon Sep 17 00:00:00 2001 From: Lambda Date: Sun, 10 Aug 2025 11:04:11 +0000 Subject: [PATCH] Renamed MSC3575 -> MSC4186, remove obsolete config --- Cargo.toml | 2 +- src/api/client_server/sync.rs | 2 +- src/api/client_server/sync/{msc3575.rs => msc4186.rs} | 4 ++-- src/api/client_server/unversioned.rs | 1 + src/api/well_known.rs | 9 --------- src/cli/serve.rs | 2 +- src/config.rs | 3 --- 7 files changed, 6 insertions(+), 17 deletions(-) rename src/api/client_server/sync/{msc3575.rs => msc4186.rs} (99%) diff --git a/Cargo.toml b/Cargo.toml index 6cfd3f65..87ee7593 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -165,7 +165,7 @@ features = [ "state-res", "unstable-msc2448", "ring-compat", - "unstable-msc3575", + "unstable-msc4186", ] [target.'cfg(unix)'.dependencies] diff --git a/src/api/client_server/sync.rs b/src/api/client_server/sync.rs index 2a17aa17..a2ed2c86 100644 --- a/src/api/client_server/sync.rs +++ b/src/api/client_server/sync.rs @@ -5,7 +5,7 @@ use crate::{ service::rooms::timeline::PduCount, services, Error, PduEvent, Result, }; -pub(crate) mod msc3575; +pub(crate) mod msc4186; pub(crate) mod v3; fn load_timeline( diff --git a/src/api/client_server/sync/msc3575.rs b/src/api/client_server/sync/msc4186.rs similarity index 99% rename from src/api/client_server/sync/msc3575.rs rename to src/api/client_server/sync/msc4186.rs index 47e93472..969853b6 100644 --- a/src/api/client_server/sync/msc3575.rs +++ b/src/api/client_server/sync/msc4186.rs @@ -1,6 +1,6 @@ -//! [MSC3575], aka Sliding Sync, aka Sync v3 (even though the endpoint is called -//! /v4) support +//! [MSC4186], aka Simplified Sliding Sync, aka Simplified [MSC3575], support //! +//! [MSC4186]: https://github.com/matrix-org/matrix-spec-proposals/pull/4186 //! [MSC3575]: https://github.com/matrix-org/matrix-spec-proposals/pull/3575 use std::{ diff --git a/src/api/client_server/unversioned.rs b/src/api/client_server/unversioned.rs index 92ea88ed..5605f53c 100644 --- a/src/api/client_server/unversioned.rs +++ b/src/api/client_server/unversioned.rs @@ -32,6 +32,7 @@ pub(crate) async fn get_supported_versions_route( unstable_features: BTreeMap::from_iter([ ("org.matrix.e2e_cross_signing".to_owned(), true), ("org.matrix.msc3916.stable".to_owned(), true), + ("org.matrix.simplified_msc3575".to_owned(), true), ]), }; diff --git a/src/api/well_known.rs b/src/api/well_known.rs index 44210e55..edb5a347 100644 --- a/src/api/well_known.rs +++ b/src/api/well_known.rs @@ -37,14 +37,5 @@ pub(crate) async fn client(_: Ar) -> Ra { Ra(client::Response { homeserver: client::HomeserverInfo::new(base_url.clone()), identity_server: None, - sliding_sync_proxy: services() - .globals - .config - .server_discovery - .client - .advertise_sliding_sync - .then_some(client::SlidingSyncProxyInfo { - url: base_url, - }), }) } diff --git a/src/cli/serve.rs b/src/cli/serve.rs index 7a528748..be781fe5 100644 --- a/src/cli/serve.rs +++ b/src/cli/serve.rs @@ -651,7 +651,7 @@ fn client_routes() -> Router { .ruma_route(c2s::get_state_events_route) .ruma_route(c2s::get_state_events_for_key_route) .ruma_route(c2s::v3::sync_events_route) - .ruma_route(c2s::msc3575::sync_events_v4_route) + .ruma_route(c2s::msc4186::sync_events_v5_route) .ruma_route(c2s::get_context_route) .ruma_route(c2s::get_message_events_route) .ruma_route(c2s::search_events_route) diff --git a/src/config.rs b/src/config.rs index b597e4a9..5924d232 100644 --- a/src/config.rs +++ b/src/config.rs @@ -151,9 +151,6 @@ pub(crate) struct ServerServerDiscovery { pub(crate) struct ClientServerDiscovery { /// The base URL to make client-server API requests to pub(crate) base_url: Url, - - #[serde(default, rename = "advertise_buggy_sliding_sync")] - pub(crate) advertise_sliding_sync: bool, } #[derive(Debug, Deserialize)]