refactor: unify channel open-group-policy warning builders

This commit is contained in:
Peter Steinberger
2026-03-07 22:06:29 +00:00
parent 4b61779a46
commit 8e0e76697a
19 changed files with 293 additions and 22 deletions

View File

@@ -1,3 +1,4 @@
import { buildOpenGroupPolicyWarning } from "openclaw/plugin-sdk";
import {
buildBaseAccountStatusSnapshot,
buildBaseChannelStatusSummary,
@@ -146,7 +147,11 @@ export const ircPlugin: ChannelPlugin<ResolvedIrcAccount, IrcProbe> = {
});
if (groupPolicy === "open") {
warnings.push(
'- IRC channels: groupPolicy="open" allows all channels and senders (mention-gated). Prefer channels.irc.groupPolicy="allowlist" with channels.irc.groups.',
buildOpenGroupPolicyWarning({
surface: "IRC channels",
openBehavior: "allows all channels and senders (mention-gated)",
remediation: 'Prefer channels.irc.groupPolicy="allowlist" with channels.irc.groups',
}),
);
}
if (!account.config.tls) {