fix feishu conflict (#850)

This commit is contained in:
paisley
2026-04-14 13:31:25 +08:00
committed by GitHub
Unverified
parent 03c40985e1
commit 54ec784545
2 changed files with 28 additions and 18 deletions

View File

@@ -411,7 +411,9 @@ async function ensurePluginAllowlist(currentConfig: OpenClawConfig, channelType:
allow: [feishuPluginId],
enabled: true,
entries: {
[feishuPluginId]: { enabled: true }
[feishuPluginId]: { enabled: true },
// Disable the built-in feishu plugin when using openclaw-lark
...(feishuPluginId !== 'feishu' ? { feishu: { enabled: false } } : {}),
}
};
} else {
@@ -432,8 +434,15 @@ async function ensurePluginAllowlist(currentConfig: OpenClawConfig, channelType:
if (!currentConfig.plugins.entries) {
currentConfig.plugins.entries = {};
}
// Remove conflicting feishu entries; keep only the resolved plugin id.
delete currentConfig.plugins.entries['feishu'];
// Remove conflicting feishu plugin entries; keep only the resolved plugin id.
// When the resolved plugin id is NOT 'feishu', explicitly disable the
// built-in feishu plugin (OpenClaw ships one in dist/extensions/feishu/)
// to prevent it from conflicting with the official openclaw-lark plugin.
if (feishuPluginId !== 'feishu') {
currentConfig.plugins.entries['feishu'] = { enabled: false };
} else {
delete currentConfig.plugins.entries['feishu'];
}
for (const candidateId of FEISHU_PLUGIN_ID_CANDIDATES) {
if (candidateId !== feishuPluginId) {
delete currentConfig.plugins.entries[candidateId];