vietnamese
This commit is contained in:
@@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user