mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 05:31:23 +00:00
fix(routing): make bindings dynamic by calling loadConfig() per-message (#11372)
This commit is contained in:
@@ -17,6 +17,7 @@ import { formatAllowlistMatchMeta } from "../../channels/allowlist-match.js";
|
||||
import { resolveControlCommandGate } from "../../channels/command-gating.js";
|
||||
import { logInboundDrop } from "../../channels/logging.js";
|
||||
import { resolveMentionGatingWithBypass } from "../../channels/mention-gating.js";
|
||||
import { loadConfig } from "../../config/config.js";
|
||||
import { logVerbose, shouldLogVerbose } from "../../globals.js";
|
||||
import { recordChannelActivity } from "../../infra/channel-activity.js";
|
||||
import { enqueueSystemEvent } from "../../infra/system-events.js";
|
||||
@@ -218,8 +219,9 @@ export async function preflightDiscordMessage(
|
||||
earlyThreadParentType = parentInfo.type;
|
||||
}
|
||||
|
||||
// Fresh config for bindings lookup; other routing inputs are payload-derived.
|
||||
const route = resolveAgentRoute({
|
||||
cfg: params.cfg,
|
||||
cfg: loadConfig(),
|
||||
channel: "discord",
|
||||
accountId: params.accountId,
|
||||
guildId: params.data.guild_id ?? undefined,
|
||||
|
||||
Reference in New Issue
Block a user