diff options
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/config.rs b/src/config.rs index a4bba44..bf9af1e 100644 --- a/src/config.rs +++ b/src/config.rs @@ -2,6 +2,7 @@ use std::{fs, path::Path}; use anyhow::Result; use serde::Deserialize; +use serde_with::{serde_as, OneOrMany}; /// The main configuration. #[derive(Debug, Clone, Deserialize, Default)] @@ -36,6 +37,7 @@ pub struct Discord { } /// Configuration pertaining to the Matrix posting. +#[serde_as] #[derive(Debug, Clone, Deserialize)] pub struct Matrix { /// Matrix homeserver. @@ -46,8 +48,9 @@ pub struct Matrix { pub password: String, /// Device ID, or None if a new one should be generated. pub device_id: Option<String>, - /// Room ID where the message should be posted to. - pub room_id: String, + /// Room ID(s) where the message should be posted to. + #[serde_as(as = "OneOrMany<_>")] + pub room_id: Vec<String>, } /// Attempt to load the configuration from the given file. |