Add config option for creating admin room non-federated (closes #118)

This commit is contained in:
dasha_uwu
2025-08-23 00:32:25 +05:00
parent d4421422b2
commit 3a1649bcaf
3 changed files with 13 additions and 1 deletions

View File

@@ -1713,6 +1713,13 @@ pub struct Config {
#[serde(default = "true_fn")]
pub create_admin_room: bool,
/// Whether to enable federation on the admin room. This cannot be changed
/// after the admin room is created.
///
/// default: true
#[serde(default = "true_fn")]
pub federate_admin_room: bool,
/// Sentry.io crash/panic reporting, performance monitoring/metrics, etc.
/// This is NOT enabled by default. tuwunel's default Sentry reporting
/// endpoint domain is `o4509498990067712.ingest.us.sentry.io`.

View File

@@ -71,7 +71,7 @@ pub async fn create_admin_room(services: &Services) -> Result {
.timeline
.build_and_append_pdu(
PduBuilder::state(String::new(), &RoomCreateEventContent {
federate: true,
federate: services.config.federate_admin_room,
predecessor: None,
room_version: room_version.clone(),
..create_content

View File

@@ -1476,6 +1476,11 @@
#
#create_admin_room = true
# Whether to enable federation on the admin room. This cannot be changed
# after the admin room is created.
#
#federate_admin_room = true
# Sentry.io crash/panic reporting, performance monitoring/metrics, etc.
# This is NOT enabled by default. tuwunel's default Sentry reporting
# endpoint domain is `o4509498990067712.ingest.us.sentry.io`.