Skip to content

Commit 9969898

Browse files
authored
Merge branch 'main' into secret_file
2 parents 453e1db + 5a0bf9c commit 9969898

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 async fn homeserver_connection_from_config(
469469
http_client: reqwest::Client,
470470
) -> anyhow::Result<Arc<dyn HomeserverConnection>> {
471471
Ok(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().await?,
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().await?,
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().await?,

crates/config/src/sections/matrix.rs

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

38-
/// Homeserver is Synapse, using the legacy API, in read-only mode
36+
/// Homeserver is Synapse, version 1.135.0 or newer, in read-only mode
3937
///
4038
/// This is meant for testing rolling out Matrix Authentication Service with
4139
/// no risk of writing data to the homeserver.
42-
///
43-
/// This will switch to using the modern API in a few releases.
4440
SynapseReadOnly,
4541

46-
/// Homeserver is Synapse, using the legacy API,
42+
/// Homeserver is Synapse, using the legacy API
4743
SynapseLegacy,
4844

49-
/// Homeserver is Synapse, with the modern API available
45+
/// Homeserver is Synapse, with the modern API available (>= 1.135.0)
5046
SynapseModern,
5147
}
5248

docs/config.schema.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1710,28 +1710,28 @@
17101710
"description": "The kind of homeserver it is.",
17111711
"oneOf": [
17121712
{
1713-
"description": "Homeserver is Synapse, using the legacy API\n\nThis will switch to using the modern API in a few releases.",
1713+
"description": "Homeserver is Synapse, version 1.135.0 or newer",
17141714
"type": "string",
17151715
"enum": [
17161716
"synapse"
17171717
]
17181718
},
17191719
{
1720-
"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.",
1720+
"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.",
17211721
"type": "string",
17221722
"enum": [
17231723
"synapse_read_only"
17241724
]
17251725
},
17261726
{
1727-
"description": "Homeserver is Synapse, using the legacy API,",
1727+
"description": "Homeserver is Synapse, using the legacy API",
17281728
"type": "string",
17291729
"enum": [
17301730
"synapse_legacy"
17311731
]
17321732
},
17331733
{
1734-
"description": "Homeserver is Synapse, with the modern API available",
1734+
"description": "Homeserver is Synapse, with the modern API available (>= 1.135.0)",
17351735
"type": "string",
17361736
"enum": [
17371737
"synapse_modern"

0 commit comments

Comments
 (0)