Skip to content

Commit 7538369

Browse files
committed
fix: also gate extraWarningsForAccount on top-level when all accounts override groupAllowFrom (fixes #92684)
ClawSweeper review finding [P2]: the Telegram extra-warning path was not gated, so the channel plugin could still emit false positives even after the shared default warning was suppressed. Wrap both hooks together so the top-level scan is fully silent when every active sub-account supplies its own groupAllowFrom.
1 parent 0e81f96 commit 7538369

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎src/commands/doctor/shared/empty-allowlist-scan.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,16 @@ export function scanEmptyAllowlistPolicyWarnings(
109109
);
110110

111111
const origSkipDefault = params.shouldSkipDefaultEmptyGroupAllowlistWarning;
112+
const origExtraWarnings = params.extraWarningsForAccount;
112113
if (allSubAccountsHaveGroupAllowFrom) {
113114
params.shouldSkipDefaultEmptyGroupAllowlistWarning = (ctx) =>
114115
ctx.parent === undefined ? true : (origSkipDefault?.(ctx) ?? false);
116+
params.extraWarningsForAccount = (ctx) =>
117+
ctx.parent === undefined ? [] : (origExtraWarnings?.(ctx) ?? []);
115118
}
116119
checkAccount(channelConfig, `channels.${channelName}`, channelName);
117120
params.shouldSkipDefaultEmptyGroupAllowlistWarning = origSkipDefault;
121+
params.extraWarningsForAccount = origExtraWarnings;
118122

119123
const accounts = channelAccounts;
120124
if (!accounts) {

0 commit comments

Comments
 (0)