Skip to content

Commit 5a0bf9c

Browse files
authored
Use the modern Synapse API (>= 1.135.0) by default (element-hq#4858)
2 parents c6ae5c7 + f302711 commit 5a0bf9c

File tree

3 files changed

+12
-16
lines changed

3 files changed

+12
-16
lines changed

crates/cli/src/util.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -469,22 +469,22 @@ pub fn homeserver_connection_from_config(
469469
http_client: reqwest::Client,
470470
) -> Arc<dyn HomeserverConnection> {
471471
match config.kind {
472-
HomeserverKind::Synapse | HomeserverKind::SynapseLegacy => {
473-
Arc::new(LegacySynapseConnection::new(
472+
HomeserverKind::Synapse | HomeserverKind::SynapseModern => {
473+
Arc::new(SynapseConnection::new(
474474
config.homeserver.clone(),
475475
config.endpoint.clone(),
476476
config.secret.clone(),
477477
http_client,
478478
))
479479
}
480-
HomeserverKind::SynapseModern => Arc::new(SynapseConnection::new(
480+
HomeserverKind::SynapseLegacy => Arc::new(LegacySynapseConnection::new(
481481
config.homeserver.clone(),
482482
config.endpoint.clone(),
483483
config.secret.clone(),
484484
http_client,
485485
)),
486486
HomeserverKind::SynapseReadOnly => {
487-
let connection = LegacySynapseConnection::new(
487+
let connection = SynapseConnection::new(
488488
config.homeserver.clone(),
489489
config.endpoint.clone(),
490490
config.secret.clone(),

crates/config/src/sections/matrix.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,20 @@ fn default_endpoint() -> Url {
2727
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, Default)]
2828
#[serde(rename_all = "snake_case")]
2929
pub enum HomeserverKind {
30-
/// Homeserver is Synapse, using the legacy API
31-
///
32-
/// This will switch to using the modern API in a few releases.
30+
/// Homeserver is Synapse, version 1.135.0 or newer
3331
#[default]
3432
Synapse,
3533

36-
/// Homeserver is Synapse, using the legacy API, in read-only mode
34+
/// Homeserver is Synapse, version 1.135.0 or newer, in read-only mode
3735
///
3836
/// This is meant for testing rolling out Matrix Authentication Service with
3937
/// no risk of writing data to the homeserver.
40-
///
41-
/// This will switch to using the modern API in a few releases.
4238
SynapseReadOnly,
4339

44-
/// Homeserver is Synapse, using the legacy API,
40+
/// Homeserver is Synapse, using the legacy API
4541
SynapseLegacy,
4642

47-
/// Homeserver is Synapse, with the modern API available
43+
/// Homeserver is Synapse, with the modern API available (>= 1.135.0)
4844
SynapseModern,
4945
}
5046

docs/config.schema.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,28 +1711,28 @@
17111711
"description": "The kind of homeserver it is.",
17121712
"oneOf": [
17131713
{
1714-
"description": "Homeserver is Synapse, using the legacy API\n\nThis will switch to using the modern API in a few releases.",
1714+
"description": "Homeserver is Synapse, version 1.135.0 or newer",
17151715
"type": "string",
17161716
"enum": [
17171717
"synapse"
17181718
]
17191719
},
17201720
{
1721-
"description": "Homeserver is Synapse, using the legacy API, in read-only mode\n\nThis is meant for testing rolling out Matrix Authentication Service with no risk of writing data to the homeserver.\n\nThis will switch to using the modern API in a few releases.",
1721+
"description": "Homeserver is Synapse, version 1.135.0 or newer, in read-only mode\n\nThis is meant for testing rolling out Matrix Authentication Service with no risk of writing data to the homeserver.",
17221722
"type": "string",
17231723
"enum": [
17241724
"synapse_read_only"
17251725
]
17261726
},
17271727
{
1728-
"description": "Homeserver is Synapse, using the legacy API,",
1728+
"description": "Homeserver is Synapse, using the legacy API",
17291729
"type": "string",
17301730
"enum": [
17311731
"synapse_legacy"
17321732
]
17331733
},
17341734
{
1735-
"description": "Homeserver is Synapse, with the modern API available",
1735+
"description": "Homeserver is Synapse, with the modern API available (>= 1.135.0)",
17361736
"type": "string",
17371737
"enum": [
17381738
"synapse_modern"

0 commit comments

Comments
 (0)