fix: Set correct default for registration terms config section

This commit is contained in:
Ginger
2026-06-08 14:05:40 -04:00
parent d0e885fb1c
commit 8a652cdd2f
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -2001,7 +2001,7 @@
# privacy_policy = { name = "Privacy Policy", url = "https://homeserver.example/en/privacy_policy.html" }
# ```
#
#documents = {}
#documents =
#[global.oauth]
+3 -2
View File
@@ -2367,6 +2367,7 @@ pub struct RegistrationTerms {
/// The language code to provide to clients along with the policy documents.
///
/// default: "en"
#[serde(default = "default_terms_language")]
pub language: String,
/// Policy documents, such as terms and conditions or a privacy policy,
/// which users must agree to when registering an account.
@@ -2376,8 +2377,6 @@ pub struct RegistrationTerms {
/// [global.registration_terms.documents]
/// privacy_policy = { name = "Privacy Policy", url = "https://homeserver.example/en/privacy_policy.html" }
/// ```
///
/// default: {}
pub documents: BTreeMap<String, TermsDocument>,
}
@@ -2805,3 +2804,5 @@ fn default_client_response_timeout() -> u64 { 120 }
fn default_client_shutdown_timeout() -> u64 { 15 }
fn default_sender_shutdown_timeout() -> u64 { 5 }
fn default_terms_language() -> String { "en".to_owned() }