Skip to content

Commit e68cbea

Browse files
authored
fix(config): keep built-in channels out of plugin allowlists (openclaw#52964)
* fix(config): keep built-in channels out of plugin allowlists * docs(changelog): note doctor whatsapp allowlist fix * docs(changelog): move doctor whatsapp fix to top
1 parent 70b235f commit e68cbea

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ Docs: https://docs.openclaw.ai
1010

1111
### Fixes
1212

13-
1413
## 2026.3.22
1514

1615
### Breaking
@@ -114,6 +113,7 @@ Docs: https://docs.openclaw.ai
114113

115114
### Fixes
116115

116+
- Doctor/WhatsApp: stop auto-enable from appending built-in channel ids like `whatsapp` to `plugins.allow`, so `openclaw doctor --fix` no longer writes schema-invalid plugin allowlist entries when repairing built-in channels. Fixes #52931. Thanks @vincentkoc.
117117
- Agents/Anthropic: preserve latest assistant thinking and redacted-thinking block ordering during transcript image sanitization so follow-up turns do not trip Anthropic's unmodified-thinking validation. Thanks @vincentkoc.
118118
- Models/OpenAI Codex OAuth and Plugins/MiniMax OAuth: ensure env-configured HTTP/HTTPS proxy dispatchers are initialized before OAuth preflight and token exchange requests so proxy-required environments can complete MiniMax and OpenAI Codex sign-in flows again. (#52228; fixes #51619, #51569) Thanks @openperf.
119119
- Plugins/DeepSeek: refactor the bundled DeepSeek provider onto the shared single-provider plugin entry, move its coverage into the extension test lane, and keep bundled auth env-var metadata on the generated manifest path. (#48762) Thanks @07akioni.

src/config/plugin-auto-enable.test.ts

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,12 @@ afterEach(() => {
127127
});
128128

129129
describe("applyPluginAutoEnable", () => {
130-
it("auto-enables built-in channels and appends to existing allowlist", () => {
130+
it("auto-enables built-in channels without appending to plugins.allow", () => {
131131
const result = applyWithSlackConfig({ plugins: { allow: ["telegram"] } });
132132

133133
expect(result.config.channels?.slack?.enabled).toBe(true);
134134
expect(result.config.plugins?.entries?.slack).toBeUndefined();
135-
expect(result.config.plugins?.allow).toEqual(["telegram", "slack"]);
135+
expect(result.config.plugins?.allow).toEqual(["telegram"]);
136136
expect(result.changes.join("\n")).toContain("Slack configured, enabled automatically.");
137137
});
138138

@@ -179,6 +179,27 @@ describe("applyPluginAutoEnable", () => {
179179
expect(validated.ok).toBe(true);
180180
});
181181

182+
it("does not append built-in WhatsApp to plugins.allow during auto-enable", () => {
183+
const result = applyPluginAutoEnable({
184+
config: {
185+
channels: {
186+
whatsapp: {
187+
allowFrom: ["+15555550123"],
188+
},
189+
},
190+
plugins: {
191+
allow: ["telegram"],
192+
},
193+
},
194+
env: {},
195+
});
196+
197+
expect(result.config.channels?.whatsapp?.enabled).toBe(true);
198+
expect(result.config.plugins?.allow).toEqual(["telegram"]);
199+
const validated = validateConfigObject(result.config);
200+
expect(validated.ok).toBe(true);
201+
});
202+
182203
it("respects explicit disable", () => {
183204
const result = applyPluginAutoEnable({
184205
config: {

src/config/plugin-auto-enable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ export function applyPluginAutoEnable(params: {
478478
continue;
479479
}
480480
next = registerPluginEntry(next, entry.pluginId);
481-
if (allowMissing || !builtInChannelId) {
481+
if (!builtInChannelId) {
482482
next = ensurePluginAllowlisted(next, entry.pluginId);
483483
}
484484
changes.push(formatAutoEnableChange(entry));

0 commit comments

Comments
 (0)