openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
26 lines (25 loc) • 973 B
JavaScript
import { i as mergeDmAllowFromSources, o as resolveGroupAllowFromSources } from "./allow-from-BGE4RL6B.mjs";
//#region src/channels/message-access/effective-allow-from.ts
/**
* Merge configured direct, group, and pairing-store allowlists into the
* effective lists consumed by sender and context-visibility checks.
*/
function resolveChannelIngressEffectiveAllowFromLists(e) {
const t = Array.isArray(e.allowFrom) ? e.allowFrom : void 0;
const n = Array.isArray(e.groupAllowFrom) ? e.groupAllowFrom : void 0;
const r = Array.isArray(e.storeAllowFrom) ? e.storeAllowFrom : void 0;
return {
effectiveAllowFrom: mergeDmAllowFromSources({
allowFrom: t,
storeAllowFrom: r,
dmPolicy: e.dmPolicy ?? void 0
}),
effectiveGroupAllowFrom: resolveGroupAllowFromSources({
allowFrom: t,
groupAllowFrom: n,
fallbackToAllowFrom: e.groupAllowFromFallbackToAllowFrom ?? void 0
})
};
}
//#endregion
export { resolveChannelIngressEffectiveAllowFromLists as t };