feat(channels): wire up email channel (IMAP/SMTP) into config and registration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Argenis 2026-02-15 10:58:30 -05:00 committed by GitHub
parent efe7ae53ce
commit ced4d70814
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 48 additions and 162 deletions

View file

@ -11,6 +11,7 @@ pub mod whatsapp;
pub use cli::CliChannel;
pub use discord::DiscordChannel;
pub use email_channel::EmailChannel;
pub use imessage::IMessageChannel;
pub use irc::IrcChannel;
pub use matrix::MatrixChannel;
@ -256,6 +257,7 @@ pub fn handle_command(command: crate::ChannelCommands, config: &Config) -> Resul
("iMessage", config.channels_config.imessage.is_some()),
("Matrix", config.channels_config.matrix.is_some()),
("WhatsApp", config.channels_config.whatsapp.is_some()),
("Email", config.channels_config.email.is_some()),
("IRC", config.channels_config.irc.is_some()),
] {
println!(" {} {name}", if configured { "" } else { "" });
@ -363,6 +365,10 @@ pub async fn doctor_channels(config: Config) -> Result<()> {
));
}
if let Some(ref email_cfg) = config.channels_config.email {
channels.push(("Email", Arc::new(EmailChannel::new(email_cfg.clone()))));
}
if let Some(ref irc) = config.channels_config.irc {
channels.push((
"IRC",
@ -548,6 +554,10 @@ pub async fn start_channels(config: Config) -> Result<()> {
)));
}
if let Some(ref email_cfg) = config.channels_config.email {
channels.push(Arc::new(EmailChannel::new(email_cfg.clone())));
}
if let Some(ref irc) = config.channels_config.irc {
channels.push(Arc::new(IrcChannel::new(
irc.server.clone(),