add config option to control sending admin notices of alerts

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-10-24 22:19:18 -04:00
parent 0760150822
commit 75be68fa61
No known key found for this signature in database
6 changed files with 128 additions and 76 deletions

View file

@ -377,6 +377,13 @@ pub struct Config {
#[serde(default)]
pub test: BTreeSet<String>,
/// Controls whether admin room notices like account registrations, password
/// changes, account deactivations, room directory publications, etc will
/// be sent to the admin room. Update notices and normal admin command
/// responses will still be sent.
#[serde(default = "true_fn")]
pub admin_room_notices: bool,
#[serde(flatten)]
#[allow(clippy::zero_sized_map_values)] // this is a catchall, the map shouldn't be zero at runtime
catchall: BTreeMap<String, IgnoredAny>,
@ -867,6 +874,7 @@ impl fmt::Display for Config {
.map_or("", |url| url.as_str()),
);
line("Enable the tokio-console", &self.tokio_console.to_string());
line("Admin room notices", &self.admin_room_notices.to_string());
Ok(())
}