Merge 2e420c4e1b into 4583f88626
This commit is contained in:
commit
5821290f04
@ -110,7 +110,13 @@ export function resolveChannelGroupPolicy(params: {
|
||||
}): ChannelGroupPolicy {
|
||||
const { cfg, channel } = params;
|
||||
const groups = resolveChannelGroups(cfg, channel, params.accountId);
|
||||
const allowlistEnabled = Boolean(groups && Object.keys(groups).length > 0);
|
||||
// Only enable allowlist when groupPolicy is explicitly "allowlist".
|
||||
// This allows explicit group configs (e.g., requireMention) to coexist
|
||||
// with groupPolicy: "open" without creating an implicit allowlist.
|
||||
const channelConfig = cfg.channels?.[channel];
|
||||
const groupPolicy = channelConfig?.groupPolicy ?? "open";
|
||||
const allowlistEnabled =
|
||||
groupPolicy === "allowlist" && Boolean(groups && Object.keys(groups).length > 0);
|
||||
const normalizedId = params.groupId?.trim();
|
||||
const groupConfig = normalizedId && groups ? groups[normalizedId] : undefined;
|
||||
const defaultConfig = groups?.["*"];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user