Matrix errors, retry
This commit is contained in:
parent
4a6c3db704
commit
b52dff12fe
5 changed files with 182 additions and 137 deletions
|
|
@ -45,6 +45,9 @@ pub struct Config {
|
|||
pub matrix_notify: bool,
|
||||
#[serde(default = "Config::default_matrix_password")]
|
||||
pub matrix_password: String,
|
||||
/// If connection fails, retry connecting after minimum this duration (seconds)
|
||||
#[serde(default = "Config::default_matrix_retry_timeout")]
|
||||
pub matrix_retry_timeout: u64,
|
||||
#[serde(default = "Config::default_matrix_room")]
|
||||
pub matrix_room: String,
|
||||
#[serde(default = "Config::default_matrix_server")]
|
||||
|
|
@ -108,6 +111,9 @@ impl Config {
|
|||
fn default_matrix_password() -> String {
|
||||
"".into()
|
||||
}
|
||||
fn default_matrix_retry_timeout() -> u64 {
|
||||
3600
|
||||
}
|
||||
fn default_matrix_room() -> String {
|
||||
"#maintenance:matrix.txmn.tk".into()
|
||||
}
|
||||
|
|
@ -144,6 +150,7 @@ impl Default for Config {
|
|||
listen: Self::default_listen(),
|
||||
matrix_notify: Self::default_matrix_notify(),
|
||||
matrix_password: Self::default_matrix_password(),
|
||||
matrix_retry_timeout: Self::default_matrix_retry_timeout(),
|
||||
matrix_room: Self::default_matrix_room(),
|
||||
matrix_server: Self::default_matrix_server(),
|
||||
matrix_user: Self::default_matrix_user(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue