Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions crates/cli/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,22 +469,22 @@ pub fn homeserver_connection_from_config(
http_client: reqwest::Client,
) -> Arc<dyn HomeserverConnection> {
match config.kind {
HomeserverKind::Synapse | HomeserverKind::SynapseLegacy => {
Arc::new(LegacySynapseConnection::new(
HomeserverKind::Synapse | HomeserverKind::SynapseModern => {
Arc::new(SynapseConnection::new(
config.homeserver.clone(),
config.endpoint.clone(),
config.secret.clone(),
http_client,
))
}
HomeserverKind::SynapseModern => Arc::new(SynapseConnection::new(
HomeserverKind::SynapseLegacy => Arc::new(LegacySynapseConnection::new(
config.homeserver.clone(),
config.endpoint.clone(),
config.secret.clone(),
http_client,
)),
HomeserverKind::SynapseReadOnly => {
let connection = LegacySynapseConnection::new(
let connection = SynapseConnection::new(
config.homeserver.clone(),
config.endpoint.clone(),
config.secret.clone(),
Expand Down
12 changes: 4 additions & 8 deletions crates/config/src/sections/matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,20 @@ fn default_endpoint() -> Url {
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, Default)]
#[serde(rename_all = "snake_case")]
pub enum HomeserverKind {
/// Homeserver is Synapse, using the legacy API
///
/// This will switch to using the modern API in a few releases.
/// Homeserver is Synapse, version 1.135.0 or newer
#[default]
Synapse,

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

/// Homeserver is Synapse, using the legacy API,
/// Homeserver is Synapse, using the legacy API
SynapseLegacy,

/// Homeserver is Synapse, with the modern API available
/// Homeserver is Synapse, with the modern API available (>= 1.135.0)
SynapseModern,
}

Expand Down
8 changes: 4 additions & 4 deletions docs/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1711,28 +1711,28 @@
"description": "The kind of homeserver it is.",
"oneOf": [
{
"description": "Homeserver is Synapse, using the legacy API\n\nThis will switch to using the modern API in a few releases.",
"description": "Homeserver is Synapse, version 1.135.0 or newer",
"type": "string",
"enum": [
"synapse"
]
},
{
"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.",
"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.",
"type": "string",
"enum": [
"synapse_read_only"
]
},
{
"description": "Homeserver is Synapse, using the legacy API,",
"description": "Homeserver is Synapse, using the legacy API",
"type": "string",
"enum": [
"synapse_legacy"
]
},
{
"description": "Homeserver is Synapse, with the modern API available",
"description": "Homeserver is Synapse, with the modern API available (>= 1.135.0)",
"type": "string",
"enum": [
"synapse_modern"
Expand Down
Loading