refactor(channels): reuse runtime group policy helpers

This commit is contained in:
Peter Steinberger
2026-02-22 12:44:02 +01:00
parent 13944f773f
commit 6dd36a6b77
31 changed files with 119 additions and 40 deletions

View File

@@ -4,6 +4,7 @@ import {
LineConfigSchema,
processLineMessage,
resolveAllowlistProviderRuntimeGroupPolicy,
resolveDefaultGroupPolicy,
type ChannelPlugin,
type ChannelStatusIssue,
type OpenClawConfig,
@@ -162,7 +163,7 @@ export const linePlugin: ChannelPlugin<ResolvedLineAccount> = {
};
},
collectWarnings: ({ account, cfg }) => {
const defaultGroupPolicy = cfg.channels?.defaults?.groupPolicy;
const defaultGroupPolicy = resolveDefaultGroupPolicy(cfg);
const { groupPolicy } = resolveAllowlistProviderRuntimeGroupPolicy({
providerConfigPresent: cfg.channels?.line !== undefined,
groupPolicy: account.config.groupPolicy,