refactor: share allowFrom formatter scaffolding

This commit is contained in:
Peter Steinberger
2026-03-07 23:00:03 +00:00
parent c91bfa830a
commit feac26c3b7
13 changed files with 94 additions and 48 deletions

View File

@@ -1,6 +1,7 @@
import {
buildAccountScopedDmSecurityPolicy,
collectOpenGroupPolicyRestrictSendersWarnings,
formatNormalizedAllowFromEntries,
} from "openclaw/plugin-sdk";
import {
applyAccountNameToChannelSection,
@@ -279,7 +280,10 @@ export const mattermostPlugin: ChannelPlugin<ResolvedMattermostAccount> = {
String(entry),
),
formatAllowFrom: ({ allowFrom }) =>
allowFrom.map((entry) => formatAllowEntry(String(entry))).filter(Boolean),
formatNormalizedAllowFromEntries({
allowFrom,
normalizeEntry: formatAllowEntry,
}),
},
security: {
resolveDmPolicy: ({ cfg, accountId, account }) => {