Skip to content

Commit 04c25e9

Browse files
committed
fix(infra): allow plugins without outbound capability to handle channel selection
1 parent 73f8792 commit 04c25e9

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/infra/outbound/internal-source-reply.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
normalizeOptionalString,
55
} from "@openclaw/normalization-core/string-coerce";
66
import type { SourceReplyDeliveryMode } from "../../auto-reply/get-reply-options.types.js";
7+
import { getLoadedChannelPlugin } from "../../channels/plugins/index.js";
78
import type { ChannelThreadingToolContext } from "../../channels/plugins/types.public.js";
89
import type { OpenClawConfig } from "../../config/types.openclaw.js";
910
import { parseAgentSessionKey, parseThreadSessionSuffix } from "../../routing/session-key.js";
@@ -87,7 +88,15 @@ async function hasConfiguredCurrentSourceChannel(
8788
if (!isConfiguredChannel(input.cfg, provider)) {
8889
return false;
8990
}
90-
if (!resolveOutboundChannelPlugin({ channel: provider, cfg: input.cfg, allowBootstrap: true })) {
91+
const outboundPlugin = resolveOutboundChannelPlugin({
92+
channel: provider,
93+
cfg: input.cfg,
94+
allowBootstrap: true,
95+
});
96+
const plugin =
97+
outboundPlugin ??
98+
getLoadedChannelPlugin(provider as Parameters<typeof getLoadedChannelPlugin>[0]);
99+
if (!plugin?.actions?.handleAction && !plugin?.outbound) {
91100
return false;
92101
}
93102
const configuredChannels = await listConfiguredMessageChannels(input.cfg);

0 commit comments

Comments
 (0)