mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 15:08:25 +00:00
fix(routing): make bindings dynamic by calling loadConfig() per-message (#11372)
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import type { getReplyFromConfig } from "../../../auto-reply/reply.js";
|
||||
import type { MsgContext } from "../../../auto-reply/templating.js";
|
||||
import type { loadConfig } from "../../../config/config.js";
|
||||
import type { MentionConfig } from "../mentions.js";
|
||||
import type { WebInboundMsg } from "../types.js";
|
||||
import type { EchoTracker } from "./echo.js";
|
||||
import type { GroupHistoryEntry } from "./group-gating.js";
|
||||
import { loadConfig } from "../../../config/config.js";
|
||||
import { logVerbose } from "../../../globals.js";
|
||||
import { resolveAgentRoute } from "../../../routing/resolve-route.js";
|
||||
import { buildGroupHistoryKey } from "../../../routing/session-key.js";
|
||||
@@ -63,8 +63,9 @@ export function createWebOnMessageHandler(params: {
|
||||
return async (msg: WebInboundMsg) => {
|
||||
const conversationId = msg.conversationId ?? msg.from;
|
||||
const peerId = resolvePeerId(msg);
|
||||
// Fresh config for bindings lookup; other routing inputs are payload-derived.
|
||||
const route = resolveAgentRoute({
|
||||
cfg: params.cfg,
|
||||
cfg: loadConfig(),
|
||||
channel: "whatsapp",
|
||||
accountId: msg.accountId,
|
||||
peer: {
|
||||
|
||||
Reference in New Issue
Block a user