From 7d2b4ed4e1e8ac3fcb65e5108070d986fd73242d Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 31 Mar 2026 16:35:57 +0100 Subject: [PATCH] fix: restore whatsapp runtime seams --- extensions/whatsapp/src/channel.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/extensions/whatsapp/src/channel.ts b/extensions/whatsapp/src/channel.ts index 8b02ad6d01f..59501dc5473 100644 --- a/extensions/whatsapp/src/channel.ts +++ b/extensions/whatsapp/src/channel.ts @@ -8,6 +8,7 @@ import { } from "openclaw/plugin-sdk/status-helpers"; // WhatsApp-specific imports from local extension code (moved from src/web/ and src/channels/plugins/) import { resolveWhatsAppAccount, type ResolvedWhatsAppAccount } from "./accounts.js"; +import { handleWhatsAppAction } from "./action-runtime.js"; import { createWhatsAppLoginTool } from "./agent-tools-login.js"; import { whatsappApprovalAuth } from "./approval-auth.js"; import type { WebChannelStatus } from "./auto-reply/types.js"; @@ -36,6 +37,7 @@ import { normalizeWhatsAppTarget, } from "./runtime-api.js"; import { getWhatsAppRuntime } from "./runtime.js"; +import { sendMessageWhatsApp, sendPollWhatsApp } from "./send.js"; import { resolveWhatsAppOutboundSessionRoute } from "./session-route.js"; import { whatsappSetupAdapter } from "./setup-core.js"; import { @@ -69,10 +71,8 @@ export const whatsappPlugin: ChannelPlugin = outbound: { ...createWhatsAppOutboundBase({ chunker: chunkText, - sendMessageWhatsApp: (...args) => - getWhatsAppRuntime().channel.whatsapp.sendMessageWhatsApp(...args), - sendPollWhatsApp: (...args) => - getWhatsAppRuntime().channel.whatsapp.sendPollWhatsApp(...args), + sendMessageWhatsApp, + sendPollWhatsApp, shouldLogVerbose: () => getWhatsAppRuntime().logging.shouldLogVerbose(), resolveTarget: ({ to, allowFrom, mode }) => resolveWhatsAppOutboundTarget({ to, allowFrom, mode }), @@ -190,7 +190,7 @@ export const whatsappPlugin: ChannelPlugin = const messageId = String(messageIdRaw); const emoji = readStringParam(params, "emoji", { allowEmpty: true }); const remove = typeof params.remove === "boolean" ? params.remove : undefined; - return await getWhatsAppRuntime().channel.whatsapp.handleWhatsAppAction( + return await handleWhatsAppAction( { action: "react", chatJid: