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

@ -6,6 +6,7 @@ pub mod imessage;
pub mod irc;
pub mod lark;
pub mod matrix;
pub mod mattermost;
pub mod qq;
pub mod signal;
pub mod slack;
@ -21,6 +22,7 @@ pub use imessage::IMessageChannel;
pub use irc::IrcChannel;
pub use lark::LarkChannel;
pub use matrix::MatrixChannel;
pub use mattermost::MattermostChannel;
pub use qq::QQChannel;
pub use signal::SignalChannel;
pub use slack::SlackChannel;
@ -1118,6 +1120,15 @@ pub async fn start_channels(config: Config) -> Result<()> {
)));
}
if let Some(ref mm) = config.channels_config.mattermost {
channels.push(Arc::new(MattermostChannel::new(
mm.url.clone(),
mm.bot_token.clone(),
mm.channel_id.clone(),
mm.allowed_users.clone(),
)));
}
if let Some(ref im) = config.channels_config.imessage {
channels.push(Arc::new(IMessageChannel::new(im.allowed_contacts.clone())));
}