Revert "fix(whatsapp): allow per-message link preview override\n\nWhatsApp messages default to enabling link previews for URLs. This adds\nsupport for overriding this behavior per-message via the \nparameter (e.g. from tool options), consistent with Telegram.\n\nFix: Updated internal WhatsApp Web API layers to pass option\ndown to Baileys ."

This reverts commit 1bef2fc68b.
This commit is contained in:
Sebastian
2026-02-16 22:59:37 -05:00
parent 67014228cf
commit 65fa529e03
6 changed files with 9 additions and 97 deletions

View File

@@ -290,15 +290,12 @@ export const whatsappPlugin: ChannelPlugin<ResolvedWhatsAppAccount> = {
pollMaxOptions: 12,
resolveTarget: ({ to, allowFrom, mode }) =>
resolveWhatsAppOutboundTarget({ to, allowFrom, mode }),
sendText: async (params) => {
const { to, text, accountId, deps, gifPlayback } = params;
const linkPreview = (params as { linkPreview?: boolean }).linkPreview;
sendText: async ({ to, text, accountId, deps, gifPlayback }) => {
const send = deps?.sendWhatsApp ?? getWhatsAppRuntime().channel.whatsapp.sendMessageWhatsApp;
const result = await send(to, text, {
verbose: false,
accountId: accountId ?? undefined,
gifPlayback,
linkPreview,
});
return { channel: "whatsapp", ...result };
},