diff --git a/src/api/well_known.rs b/src/api/well_known.rs index e32d45cb..f0c0df07 100644 --- a/src/api/well_known.rs +++ b/src/api/well_known.rs @@ -51,8 +51,14 @@ pub(crate) async fn client(_: Ar) -> Ra { Ra(client::Response { homeserver: client::HomeserverInfo::new(base_url.clone()), identity_server: None, - sliding_sync_proxy: Some(client::SlidingSyncProxyInfo { - url: base_url, - }), + sliding_sync_proxy: services() + .globals + .config + .server_discovery + .client + .advertise_sliding_sync + .then_some(client::SlidingSyncProxyInfo { + url: base_url, + }), }) } diff --git a/src/config.rs b/src/config.rs index e331364f..51761f85 100644 --- a/src/config.rs +++ b/src/config.rs @@ -96,6 +96,9 @@ pub(crate) struct ClientServerDiscovery { /// Controls whether HTTPS is used #[serde(default)] pub(crate) insecure: bool, + + #[serde(default, rename = "advertise_buggy_sliding_sync")] + pub(crate) advertise_sliding_sync: bool, } #[derive(Debug, Deserialize)]