mirror of https://github.com/openclaw/openclaw.git
fix: restore whatsapp runtime seams
This commit is contained in:
parent
6eddd55393
commit
7d2b4ed4e1
|
|
@ -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<ResolvedWhatsAppAccount> =
|
|||
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<ResolvedWhatsAppAccount> =
|
|||
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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue