1
0
Fork 0
forked from mirror/grapevine

hide sliding sync behind explicit option

We want to make sure users know this sliding sync impl is pretty buggy
before they attempt to use it.
This commit is contained in:
Charles Hall 2024-09-08 14:07:16 -07:00
parent 806cc0cb28
commit 449c27642c
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
2 changed files with 12 additions and 3 deletions

View file

@ -51,8 +51,14 @@ pub(crate) async fn client(_: Ar<client::Request>) -> Ra<client::Response> {
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,
}),
})
}

View file

@ -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)]