diff --git a/src/auto-reply/reply/dispatch-from-config.types.ts b/src/auto-reply/reply/dispatch-from-config.types.ts index 5483d2f52e3..945cfdfd8f3 100644 --- a/src/auto-reply/reply/dispatch-from-config.types.ts +++ b/src/auto-reply/reply/dispatch-from-config.types.ts @@ -1,6 +1,7 @@ import type { OpenClawConfig } from "../../config/types.openclaw.js"; import type { GetReplyOptions } from "../get-reply-options.types.js"; import type { FinalizedMsgContext } from "../templating.js"; +import type { GetReplyFromConfig } from "./get-reply.types.js"; import type { ReplyDispatchKind, ReplyDispatcher } from "./reply-dispatcher.types.js"; export type DispatchFromConfigResult = { @@ -13,7 +14,7 @@ export type DispatchFromConfigParams = { cfg: OpenClawConfig; dispatcher: ReplyDispatcher; replyOptions?: Omit; - replyResolver?: typeof import("./get-reply-from-config.runtime.js").getReplyFromConfig; + replyResolver?: GetReplyFromConfig; fastAbortResolver?: typeof import("./abort.runtime.js").tryFastAbortFromMessage; formatAbortReplyTextResolver?: typeof import("./abort.runtime.js").formatAbortReplyText; /** Optional config override passed to getReplyFromConfig (e.g. per-sender timezone). */ diff --git a/src/auto-reply/reply/group-id.ts b/src/auto-reply/reply/group-id.ts index d1c30ea62b8..c9d107041e4 100644 --- a/src/auto-reply/reply/group-id.ts +++ b/src/auto-reply/reply/group-id.ts @@ -1,5 +1,6 @@ -import { getBundledChannelPlugin } from "../../channels/plugins/bundled.js"; -import { getLoadedChannelPlugin, normalizeChannelId } from "../../channels/plugins/index.js"; +import { getLoadedChannelPluginById } from "../../channels/plugins/registry-loaded.js"; +import type { ChannelPlugin } from "../../channels/plugins/types.plugin.js"; +import { normalizeAnyChannelId } from "../../channels/registry.js"; import { normalizeOptionalLowercaseString, normalizeOptionalString, @@ -19,10 +20,9 @@ export function extractExplicitGroupId(raw: string | undefined | null): string | } const firstPart = trimmed.split(":").find(Boolean); const channelId = - normalizeChannelId(firstPart ?? "") ?? normalizeOptionalLowercaseString(firstPart); + normalizeAnyChannelId(firstPart ?? "") ?? normalizeOptionalLowercaseString(firstPart); const messaging = channelId - ? (getLoadedChannelPlugin(channelId)?.messaging ?? - getBundledChannelPlugin(channelId)?.messaging) + ? (getLoadedChannelPluginById(channelId) as ChannelPlugin | undefined)?.messaging : undefined; const parsed = messaging?.parseExplicitTarget?.({ raw: trimmed }) ?? null; if (parsed && parsed.chatType && parsed.chatType !== "direct") {