mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 10:50:44 +00:00
Auto-reply: avoid eager bundled route fallback
This commit is contained in:
@@ -16,15 +16,9 @@ const mocks = vi.hoisted(() => ({
|
||||
deliverOutboundPayloads: vi.fn(),
|
||||
}));
|
||||
|
||||
vi.mock("../../infra/outbound/deliver-runtime.js", async () => {
|
||||
const actual = await vi.importActual<typeof import("../../infra/outbound/deliver-runtime.js")>(
|
||||
"../../infra/outbound/deliver-runtime.js",
|
||||
);
|
||||
return {
|
||||
...actual,
|
||||
deliverOutboundPayloads: mocks.deliverOutboundPayloads,
|
||||
};
|
||||
});
|
||||
vi.mock("../../infra/outbound/deliver-runtime.js", () => ({
|
||||
deliverOutboundPayloads: mocks.deliverOutboundPayloads,
|
||||
}));
|
||||
|
||||
const { routeReply } = await import("./route-reply.js");
|
||||
|
||||
|
||||
@@ -93,10 +93,11 @@ export async function routeReply(params: RouteReplyParams): Promise<RouteReplyRe
|
||||
const normalizedChannel = normalizeMessageChannel(channel);
|
||||
const channelId =
|
||||
normalizeChannelId(channel) ?? normalizeOptionalLowercaseString(channel) ?? null;
|
||||
const loadedPlugin = channelId ? getLoadedChannelPlugin(channelId) : undefined;
|
||||
const bundledPlugin = channelId ? getBundledChannelPlugin(channelId) : undefined;
|
||||
const messaging = loadedPlugin?.messaging ?? bundledPlugin?.messaging;
|
||||
const threading = loadedPlugin?.threading ?? bundledPlugin?.threading;
|
||||
const plugin = channelId
|
||||
? (getLoadedChannelPlugin(channelId) ?? getBundledChannelPlugin(channelId))
|
||||
: undefined;
|
||||
const messaging = plugin?.messaging;
|
||||
const threading = plugin?.threading;
|
||||
const resolvedAgentId = params.sessionKey
|
||||
? resolveSessionAgentId({
|
||||
sessionKey: params.sessionKey,
|
||||
|
||||
Reference in New Issue
Block a user