diff --git a/conduwuit-example.toml b/conduwuit-example.toml index 76b81b66..a2c61d37 100644 --- a/conduwuit-example.toml +++ b/conduwuit-example.toml @@ -159,6 +159,10 @@ ip_range_denylist = [ # For private homeservers, this is best at false. allow_guest_registration = false +# Set to true to log guest registrations in the admin room. +# Defaults to false as it may be noisy or unnecessary. +log_guest_registrations = false + # Vector list of servers that conduwuit will refuse to download remote media from. # No default. # prevent_media_downloads_from = ["example.com", "example.local"] diff --git a/src/api/client_server/account.rs b/src/api/client_server/account.rs index 80ab2450..13a75e69 100644 --- a/src/api/client_server/account.rs +++ b/src/api/client_server/account.rs @@ -290,7 +290,7 @@ pub async fn register_route(body: Ruma) -> Result, @@ -509,6 +511,10 @@ impl fmt::Display for Config { "Allow guest registration (inherently false if allow registration is false)", &self.allow_guest_registration.to_string(), ), + ( + "Log guest registrations in admin room", + &self.log_guest_registrations.to_string(), + ), ("New user display name suffix", &self.new_user_displayname_suffix), ("Allow encryption", &self.allow_encryption.to_string()), ("Allow federation", &self.allow_federation.to_string()), diff --git a/src/service/globals/mod.rs b/src/service/globals/mod.rs index a6a4ea40..644cc2c6 100644 --- a/src/service/globals/mod.rs +++ b/src/service/globals/mod.rs @@ -209,6 +209,8 @@ impl Service<'_> { pub fn allow_guest_registration(&self) -> bool { self.config.allow_guest_registration } + pub fn log_guest_registrations(&self) -> bool { self.config.log_guest_registrations } + pub fn allow_encryption(&self) -> bool { self.config.allow_encryption } pub fn allow_federation(&self) -> bool { self.config.allow_federation }