fix: enforce inbound attachment root policy across pipelines

This commit is contained in:
Peter Steinberger
2026-02-19 14:15:34 +01:00
parent cfe8457a0f
commit 1316e57403
16 changed files with 555 additions and 37 deletions

View File

@@ -1,6 +1,6 @@
import { createAccountListHelpers } from "../channels/plugins/account-helpers.js";
import type { OpenClawConfig } from "../config/config.js";
import type { IMessageAccountConfig } from "../config/types.js";
import { createAccountListHelpers } from "../channels/plugins/account-helpers.js";
import { normalizeAccountId } from "../routing/session-key.js";
export type ResolvedIMessageAccount = {
@@ -51,6 +51,8 @@ export function resolveIMessageAccount(params: {
merged.dmPolicy ||
merged.groupPolicy ||
typeof merged.includeAttachments === "boolean" ||
(merged.attachmentRoots && merged.attachmentRoots.length > 0) ||
(merged.remoteAttachmentRoots && merged.remoteAttachmentRoots.length > 0) ||
typeof merged.mediaMaxMb === "number" ||
typeof merged.textChunkLimit === "number" ||
(merged.groups && Object.keys(merged.groups).length > 0),