Add option to toggle publishing for mailing list replies
For some lists, such as release announcement lists, you may not want replies to posts published.
This commit is contained in:
@@ -65,6 +65,8 @@ pub struct GitlabWebhookConfig {
|
||||
#[derive(Clone, Deserialize)]
|
||||
pub struct MailListConfig {
|
||||
pub name: String,
|
||||
#[serde(default = "default_true")]
|
||||
pub publish_on_replies: bool,
|
||||
#[serde(default)]
|
||||
pub rooms: Vec<OwnedRoomOrAliasId>,
|
||||
}
|
||||
@@ -89,6 +91,10 @@ pub struct Config {
|
||||
pub mail_archive: Option<MailArchiveConfig>,
|
||||
}
|
||||
|
||||
fn default_true() -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn load_blocking(path: &String) -> anyhow::Result<Config> {
|
||||
let f = File::open(path)?;
|
||||
let r = BufReader::new(f);
|
||||
|
Reference in New Issue
Block a user