diff --git a/extensions/zalo/src/channel.ts b/extensions/zalo/src/channel.ts index 024fb38aea2..4a37f1a5e0f 100644 --- a/extensions/zalo/src/channel.ts +++ b/extensions/zalo/src/channel.ts @@ -323,7 +323,7 @@ export const zaloPlugin: ChannelPlugin = { } return lastResult; } - return zaloPlugin.outbound!.sendText!({ ...ctx }); + return zaloPlugin.outbound!.sendText!({ ...ctx, text: ctx.payload.text ?? "" }); }, sendText: async ({ to, text, accountId, cfg }) => { const result = await sendMessageZalo(to, text, { diff --git a/extensions/zalouser/src/channel.ts b/extensions/zalouser/src/channel.ts index 20671276d42..48c49646509 100644 --- a/extensions/zalouser/src/channel.ts +++ b/extensions/zalouser/src/channel.ts @@ -539,7 +539,7 @@ export const zalouserPlugin: ChannelPlugin = { } return lastResult; } - return zalouserPlugin.outbound!.sendText!({ ...ctx }); + return zalouserPlugin.outbound!.sendText!({ ...ctx, text: ctx.payload.text ?? "" }); }, sendText: async ({ to, text, accountId, cfg }) => { const account = resolveZalouserAccountSync({ cfg: cfg, accountId }); diff --git a/src/channels/plugins/outbound/direct-text-media.ts b/src/channels/plugins/outbound/direct-text-media.ts index 47453f6d1db..7b15d34913a 100644 --- a/src/channels/plugins/outbound/direct-text-media.ts +++ b/src/channels/plugins/outbound/direct-text-media.ts @@ -112,7 +112,7 @@ export function createDirectTextMediaOutbound< } return lastResult; } - return outbound.sendText!({ ...ctx }); + return outbound.sendText!({ ...ctx, text: ctx.payload.text ?? "" }); }, sendText: async ({ cfg, to, text, accountId, deps, replyToId }) => { return await sendDirect({ diff --git a/src/channels/plugins/outbound/discord.ts b/src/channels/plugins/outbound/discord.ts index 81992fc82af..891cbf4b432 100644 --- a/src/channels/plugins/outbound/discord.ts +++ b/src/channels/plugins/outbound/discord.ts @@ -101,7 +101,7 @@ export const discordOutbound: ChannelOutboundAdapter = { } return lastResult; } - return discordOutbound.sendText!({ ...ctx }); + return discordOutbound.sendText!({ ...ctx, text: ctx.payload.text ?? "" }); }, sendText: async ({ to, text, accountId, deps, replyToId, threadId, identity, silent }) => { if (!silent) { diff --git a/src/channels/plugins/outbound/slack.ts b/src/channels/plugins/outbound/slack.ts index ecbf010dae9..2bfc0f0a672 100644 --- a/src/channels/plugins/outbound/slack.ts +++ b/src/channels/plugins/outbound/slack.ts @@ -114,7 +114,7 @@ export const slackOutbound: ChannelOutboundAdapter = { } return lastResult; } - return slackOutbound.sendText!({ ...ctx }); + return slackOutbound.sendText!({ ...ctx, text: ctx.payload.text ?? "" }); }, sendText: async ({ to, text, accountId, deps, replyToId, threadId, identity }) => { return await sendSlackOutboundMessage({ diff --git a/src/channels/plugins/outbound/whatsapp.ts b/src/channels/plugins/outbound/whatsapp.ts index fc5dbcac81c..db1c52a0a10 100644 --- a/src/channels/plugins/outbound/whatsapp.ts +++ b/src/channels/plugins/outbound/whatsapp.ts @@ -33,7 +33,7 @@ export const whatsappOutbound: ChannelOutboundAdapter = { } return lastResult; } - return whatsappOutbound.sendText!({ ...ctx }); + return whatsappOutbound.sendText!({ ...ctx, text: ctx.payload.text ?? "" }); }, sendText: async ({ to, text, accountId, deps, gifPlayback }) => { const send =