Add hierarchy_max_depth config option

This commit is contained in:
Nyaaori 2022-09-02 16:28:24 +02:00
parent 03029711fe
commit 3ff6d54be6
No known key found for this signature in database
GPG key ID: E7819C3ED4D1F82E
2 changed files with 10 additions and 0 deletions

View file

@ -52,6 +52,8 @@ pub struct Config {
pub allow_unstable_room_versions: bool,
#[serde(default = "default_default_room_version")]
pub default_room_version: RoomVersionId,
#[serde(default = "default_hierarchy_max_depth")]
pub hierarchy_max_depth: u64,
#[serde(default = "false_fn")]
pub allow_jaeger: bool,
#[serde(default = "false_fn")]
@ -261,3 +263,7 @@ fn default_turn_ttl() -> u64 {
pub fn default_default_room_version() -> RoomVersionId {
RoomVersionId::V9
}
fn default_hierarchy_max_depth() -> u64 {
6
}

View file

@ -250,6 +250,10 @@ impl Service {
self.config.enable_lightning_bolt
}
pub fn hierarchy_max_depth(&self) -> u64 {
self.config.hierarchy_max_depth
}
pub fn trusted_servers(&self) -> &[OwnedServerName] {
&self.config.trusted_servers
}