fix(whatsapp): remove outbound runtime cycle

This commit is contained in:
Vincent Koc 2026-03-22 21:04:14 -07:00
parent 218663c956
commit faae3e155d
1 changed files with 2 additions and 4 deletions

View File

@ -1,6 +1,5 @@
import { resolveOutboundSendDep } from "../../infra/outbound/send-deps.js";
import { createAttachedChannelResultAdapter } from "../../plugin-sdk/channel-send-result.js";
import { resolveWhatsAppOutboundTarget } from "../../plugin-sdk/whatsapp-core.js";
import type { PluginRuntimeChannel } from "../../plugins/runtime/types-channel.js";
import { escapeRegExp } from "../../utils.js";
import type { ChannelOutboundAdapter } from "./types.js";
@ -30,7 +29,7 @@ type CreateWhatsAppOutboundBaseParams = {
sendMessageWhatsApp: WhatsAppSendMessage;
sendPollWhatsApp: WhatsAppSendPoll;
shouldLogVerbose: () => boolean;
resolveTarget?: ChannelOutboundAdapter["resolveTarget"];
resolveTarget: ChannelOutboundAdapter["resolveTarget"];
normalizeText?: (text: string | undefined) => string;
skipEmptyText?: boolean;
};
@ -40,8 +39,7 @@ export function createWhatsAppOutboundBase({
sendMessageWhatsApp,
sendPollWhatsApp,
shouldLogVerbose,
resolveTarget = ({ to, allowFrom, mode }) =>
resolveWhatsAppOutboundTarget({ to, allowFrom, mode }),
resolveTarget,
normalizeText = (text) => text ?? "",
skipEmptyText = false,
}: CreateWhatsAppOutboundBaseParams): Pick<