From fb6e5fb430fa28f1c5bf8d46e4867bd18b3848c1 Mon Sep 17 00:00:00 2001 From: zhengkunwang223 <1paneldev@sina.com> Date: Wed, 11 Feb 2026 21:40:26 +0800 Subject: [PATCH] fix: Resolve issue where Feishu configuration does not take effect --- agent/app/service/agents.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/agent/app/service/agents.go b/agent/app/service/agents.go index 0d0dbc24a935..426cc0567eb2 100644 --- a/agent/app/service/agents.go +++ b/agent/app/service/agents.go @@ -493,6 +493,7 @@ func (a AgentService) UpdateFeishuConfig(req dto.AgentFeishuConfigUpdateReq) err AppID: req.AppID, AppSecret: req.AppSecret, }) + setFeishuPluginEnabled(conf, req.Enabled) if err := writeOpenclawConfigRaw(agent.ConfigPath, conf); err != nil { return err } @@ -610,6 +611,13 @@ func setFeishuConfig(conf map[string]interface{}, config dto.AgentFeishuConfig) channels["feishu"] = feishu } +func setFeishuPluginEnabled(conf map[string]interface{}, enabled bool) { + plugins := ensureChildMap(conf, "plugins") + entries := ensureChildMap(plugins, "entries") + feishu := ensureChildMap(entries, "feishu") + feishu["enabled"] = enabled +} + func (a AgentService) syncAgentsByAccount(account *model.AgentAccount) error { agents, err := agentRepo.List(repo.WithByAccountID(account.ID)) if err != nil {