From 4833cf2d3cb23e28e3dbb801036fe415b06c266d Mon Sep 17 00:00:00 2001 From: CityFun <31820853+zhengkunwang223@users.noreply.github.com> Date: Wed, 11 Feb 2026 22:07:06 +0800 Subject: [PATCH] fix: Resolve issue where Feishu configuration does not take effect (#11878) --- 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 0d0dbc24a..426cc0567 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 {