huskies: merge 627_refactor_migrate_slack_discord_and_whatsapp_transports_to_services_bundle
This commit is contained in:
@@ -201,19 +201,19 @@ pub async fn slash_command_receive(
|
||||
// Build a synthetic message that the command registry can parse.
|
||||
// The format is "<bot_name> <keyword> <args>" so strip_bot_mention + dispatch works.
|
||||
let synthetic_message = if payload.text.is_empty() {
|
||||
format!("{} {keyword}", ctx.bot_name)
|
||||
format!("{} {keyword}", ctx.services.bot_name)
|
||||
} else {
|
||||
format!("{} {keyword} {}", ctx.bot_name, payload.text)
|
||||
format!("{} {keyword} {}", ctx.services.bot_name, payload.text)
|
||||
};
|
||||
|
||||
use crate::chat::commands::{CommandDispatch, try_handle_command};
|
||||
|
||||
let dispatch = CommandDispatch {
|
||||
bot_name: &ctx.bot_name,
|
||||
bot_user_id: &ctx.bot_user_id,
|
||||
project_root: &ctx.project_root,
|
||||
agents: &ctx.agents,
|
||||
ambient_rooms: &ctx.ambient_rooms,
|
||||
bot_name: &ctx.services.bot_name,
|
||||
bot_user_id: &ctx.services.bot_user_id,
|
||||
project_root: &ctx.services.project_root,
|
||||
agents: &ctx.services.agents,
|
||||
ambient_rooms: &ctx.services.ambient_rooms,
|
||||
room_id: &payload.channel_id,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user