fix: Resolve issue where Feishu configuration does not take effect (#11878)

This commit is contained in:
CityFun
2026-02-11 22:07:06 +08:00
committed by GitHub
parent b5ca015632
commit 4833cf2d3c
+8
View File
@@ -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 {