Fill in the rest of the config

This commit is contained in:
Eric Eastwood
2026-06-24 15:37:42 -05:00
parent 2a609a5cdf
commit 59228e5f58
2 changed files with 15 additions and 1 deletions
+11
View File
@@ -21,6 +21,8 @@ use pyo3::{exceptions::PyRuntimeError, prelude::*};
#[derive(FromPyObject, Clone)]
pub struct SynapseConfig {
pub room: RoomConfig,
pub auth: AuthConfig,
pub server: ServerConfig,
pub experimental: ExperimentalConfig,
}
@@ -62,6 +64,15 @@ pub struct RoomConfig {
pub encryption_enabled_by_default_for_room_presets: BTreeSet<RoomCreationPreset>,
}
#[derive(FromPyObject, Clone)]
pub struct AuthConfig {
pub login_via_existing_enabled: bool,
}
#[derive(FromPyObject, Clone)]
pub struct ServerConfig {
pub max_event_delay_ms: Option<u64>,
}
#[derive(FromPyObject, Clone)]
pub struct ExperimentalConfig {
pub msc3026_enabled: bool,
+4 -1
View File
@@ -304,7 +304,10 @@ pub fn synapse_config_to_global_unstable_feature_map(config: &SynapseConfig) ->
msc4028: config.experimental.msc4028_push_encrypted_events,
msc4108: config.experimental.msc4108_enabled
|| (config.experimental.msc4108_delegation_endpoint.is_some()),
msc4140: bool(config.server.max_event_delay_ms),
msc4140: config
.server
.max_event_delay_ms
.is_some_and(|max_event_delay_ms| max_event_delay_ms > 0),
msc3575: config.experimental.msc3575_enabled,
msc4133: config.experimental.msc4133_enabled,
msc4133_stable: true,