vietnamese

This commit is contained in:
nnduc
2026-10-24 17:46:20 +07:00
parent 5467b0aa2c
commit a3cf10cb0a
33 changed files with 4306 additions and 94 deletions
+4
View File
@@ -22,6 +22,9 @@ pub struct Config {
pub session_timeout_hours: u64,
/// Allow the picture proxy and link previews to reach private networks (development)
pub allow_private_urls: bool,
/// Delete the cached messages older than this many days (0: keep them),
/// to follow the XMPP server's archive expiry
pub message_retention_days: u32,
}
fn env(key: &str) -> Option<String> {
@@ -68,6 +71,7 @@ impl Config {
xmpp_plaintext: env("MOVIM_XMPP_PLAINTEXT"),
session_timeout_hours: env("MOVIM_SESSION_TIMEOUT_HOURS").and_then(|s| s.parse().ok()).unwrap_or(24 * 7),
allow_private_urls: env("MOVIM_ALLOW_PRIVATE_URLS").is_some_and(|v| v == "1" || v == "true"),
message_retention_days: env("MOVIM_MESSAGE_RETENTION_DAYS").and_then(|s| s.parse().ok()).unwrap_or(0),
}
}
}