feat(channels): add Mattermost integration for sovereign communication

This commit is contained in:
Vernon Stinebaker 2026-02-17 21:28:53 +08:00 committed by Chummy
parent 0aa35eb669
commit 7e3f5ff497
7 changed files with 408 additions and 3 deletions

View file

@ -1278,6 +1278,7 @@ pub struct ChannelsConfig {
pub telegram: Option<TelegramConfig>,
pub discord: Option<DiscordConfig>,
pub slack: Option<SlackConfig>,
pub mattermost: Option<MattermostConfig>,
pub webhook: Option<WebhookConfig>,
pub imessage: Option<IMessageConfig>,
pub matrix: Option<MatrixConfig>,
@ -1297,6 +1298,7 @@ impl Default for ChannelsConfig {
telegram: None,
discord: None,
slack: None,
mattermost: None,
webhook: None,
imessage: None,
matrix: None,
@ -1342,6 +1344,15 @@ pub struct SlackConfig {
pub allowed_users: Vec<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct MattermostConfig {
pub url: String,
pub bot_token: String,
pub channel_id: Option<String>,
#[serde(default)]
pub allowed_users: Vec<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct WebhookConfig {
pub port: u16,
@ -2196,6 +2207,7 @@ default_temperature = 0.7
}),
discord: None,
slack: None,
mattermost: None,
webhook: None,
imessage: None,
matrix: None,
@ -2604,6 +2616,7 @@ tool_dispatcher = "xml"
telegram: None,
discord: None,
slack: None,
mattermost: None,
webhook: None,
imessage: Some(IMessageConfig {
allowed_contacts: vec!["+1".into()],
@ -2767,6 +2780,7 @@ channel_id = "C123"
telegram: None,
discord: None,
slack: None,
mattermost: None,
webhook: None,
imessage: None,
matrix: None,