mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-07 22:09:57 +00:00
fix(discord): honor agent media roots in replies
This commit is contained in:
@@ -34,6 +34,7 @@ import type { DiscordAccountConfig } from "../../config/types.discord.js";
|
||||
import { logVerbose } from "../../globals.js";
|
||||
import { enqueueSystemEvent } from "../../infra/system-events.js";
|
||||
import { logDebug, logError } from "../../logger.js";
|
||||
import { getAgentScopedMediaLocalRoots } from "../../media/local-roots.js";
|
||||
import { buildPairingReply } from "../../pairing/pairing-messages.js";
|
||||
import { upsertChannelPairingRequest } from "../../pairing/pairing-store.js";
|
||||
import { resolveAgentRoute } from "../../routing/resolve-route.js";
|
||||
@@ -976,6 +977,7 @@ async function dispatchDiscordComponentEvent(params: {
|
||||
fallbackLimit: 2000,
|
||||
});
|
||||
const token = ctx.token ?? "";
|
||||
const mediaLocalRoots = getAgentScopedMediaLocalRoots(ctx.cfg, agentId);
|
||||
const replyToMode =
|
||||
ctx.discordConfig?.replyToMode ?? ctx.cfg.channels?.discord?.replyToMode ?? "off";
|
||||
const replyReference = createReplyReferencePlanner({
|
||||
@@ -1005,6 +1007,7 @@ async function dispatchDiscordComponentEvent(params: {
|
||||
maxLinesPerMessage: ctx.discordConfig?.maxLinesPerMessage,
|
||||
tableMode,
|
||||
chunkMode: resolveChunkMode(ctx.cfg, "discord", accountId),
|
||||
mediaLocalRoots,
|
||||
});
|
||||
replyReference.markSent();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user