storkit: merge 383_refactor_reorganize_chat_system_into_chat_module_with_transport_submodules

This commit is contained in:
dave
2026-03-24 17:54:51 +00:00
parent 92c53704f0
commit 79edc28334
31 changed files with 89 additions and 87 deletions
+6 -6
View File
@@ -31,8 +31,8 @@ use settings::SettingsApi;
use std::path::{Path, PathBuf};
use std::sync::Arc;
use crate::slack::SlackWebhookContext;
use crate::whatsapp::WhatsAppWebhookContext;
use crate::chat::transport::slack::SlackWebhookContext;
use crate::chat::transport::whatsapp::WhatsAppWebhookContext;
const DEFAULT_PORT: u16 = 3001;
@@ -85,8 +85,8 @@ pub fn build_routes(
if let Some(wa_ctx) = whatsapp_ctx {
route = route.at(
"/webhook/whatsapp",
get(crate::whatsapp::webhook_verify)
.post(crate::whatsapp::webhook_receive)
get(crate::chat::transport::whatsapp::webhook_verify)
.post(crate::chat::transport::whatsapp::webhook_receive)
.data(wa_ctx),
);
}
@@ -95,11 +95,11 @@ pub fn build_routes(
route = route
.at(
"/webhook/slack",
post(crate::slack::webhook_receive).data(sl_ctx.clone()),
post(crate::chat::transport::slack::webhook_receive).data(sl_ctx.clone()),
)
.at(
"/webhook/slack/command",
post(crate::slack::slash_command_receive).data(sl_ctx),
post(crate::chat::transport::slack::slash_command_receive).data(sl_ctx),
);
}