-
Notifications
You must be signed in to change notification settings - Fork 945
fix feishu plugin conflict #852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1767,13 +1767,14 @@ export async function sanitizeOpenClawConfig(): Promise<void> { | |
| console.log('[sanitize] Removed bare "feishu" from plugins.allow (openclaw-lark plugin is configured)'); | ||
| modified = true; | ||
| } | ||
| // Delete the built-in feishu entry entirely instead of setting enabled:false. | ||
| // Setting enabled:false causes the Gateway to report the channel as "disabled" | ||
| // which shows as an error in the UI. Since 'feishu' is removed from | ||
| // plugins.allow above, the built-in extension won't auto-load. | ||
| if (pEntries.feishu) { | ||
| delete pEntries.feishu; | ||
| console.log('[sanitize] Removed built-in feishu plugin entry (openclaw-lark plugin is configured)'); | ||
| // Explicitly disable the built-in feishu extension so it doesn't | ||
| // conflict with the official openclaw-lark plugin at runtime. | ||
| // Simply deleting the entry is NOT sufficient — the built-in | ||
| // extension in dist/extensions/feishu/ (enabledByDefault: true) will | ||
| // still load unless explicitly marked as disabled. | ||
| if (!pEntries.feishu || (pEntries.feishu as Record<string, unknown>).enabled !== false) { | ||
| pEntries.feishu = { enabled: false }; | ||
| console.log('[sanitize] Disabled built-in feishu plugin (openclaw-lark plugin is configured)'); | ||
| modified = true; | ||
| } | ||
| } | ||
|
|
@@ -1828,6 +1829,14 @@ export async function sanitizeOpenClawConfig(): Promise<void> { | |
| // allowlist because they were excluded from externalPluginIds above. | ||
| if (nextAllow.length > 0) { | ||
| for (const pluginId of bundled.enabledByDefault) { | ||
| // When the official openclaw-lark (or similar) plugin replaces the | ||
| // built-in 'feishu' extension, skip re-adding 'feishu' here — | ||
| // otherwise the enabledByDefault logic undoes the conflict | ||
| // resolution performed above and the built-in extension keeps | ||
| // reappearing in plugins.allow on every gateway restart. | ||
| if (pluginId === 'feishu' && canonicalFeishuId !== 'feishu') { | ||
| continue; | ||
|
Comment on lines
+1837
to
+1838
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This guard skips re-adding bundled Useful? React with 👍 / 👎. |
||
| } | ||
| if (!nextAllow.includes(pluginId)) { | ||
| nextAllow.push(pluginId); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assignment disables the built-in
feishuextension whenevercanonicalFeishuId !== 'feishu', butcanonicalFeishuIdstill falls back toFEISHU_PLUGIN_ID_CANDIDATES[0]even when no replacement plugin is actually installed/configured. In that case, sanitize can writeplugins.entries.feishu.enabled=falsefor users who only have unrelated plugin config, so if the later auto-install/upgrade step fails (it is best-effort and swallowed), Feishu has no loadable plugin at startup. Please only forcefeishuto disabled after a confirmed replacement plugin presence.Useful? React with 👍 / 👎.