fix(config): allowlist auto-enabled built-in channels when restricted

Co-authored-by: 4rev <4rev@users.noreply.github.com>
This commit is contained in:
Peter Steinberger
2026-02-22 19:30:29 +01:00
parent 772cf7df33
commit 40680432b4
5 changed files with 38 additions and 15 deletions

View File

@@ -24,19 +24,18 @@ export function enablePluginInConfig(cfg: OpenClawConfig, pluginId: string): Plu
existing && typeof existing === "object" && !Array.isArray(existing)
? (existing as Record<string, unknown>)
: {};
return {
config: {
...cfg,
channels: {
...cfg.channels,
[builtInChannelId]: {
...existingRecord,
enabled: true,
},
let next: OpenClawConfig = {
...cfg,
channels: {
...cfg.channels,
[builtInChannelId]: {
...existingRecord,
enabled: true,
},
},
enabled: true,
};
next = ensurePluginAllowlisted(next, resolvedId);
return { config: next, enabled: true };
}
const entries = {