sendPayload: explicit text fallback in text-only path

This commit is contained in:
David Friedland
2026-03-01 21:28:00 -08:00
committed by Peter Steinberger
parent ebe54e6903
commit 47ef180fb7
6 changed files with 6 additions and 6 deletions

View File

@@ -323,7 +323,7 @@ export const zaloPlugin: ChannelPlugin<ResolvedZaloAccount> = {
}
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, {

View File

@@ -539,7 +539,7 @@ export const zalouserPlugin: ChannelPlugin<ResolvedZalouserAccount> = {
}
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 });

View File

@@ -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({

View File

@@ -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) {

View File

@@ -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({

View File

@@ -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 =