Skip to content

Commit 4833cf2

Browse files
fix: Resolve issue where Feishu configuration does not take effect (#11878)
1 parent b5ca015 commit 4833cf2

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

agent/app/service/agents.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,7 @@ func (a AgentService) UpdateFeishuConfig(req dto.AgentFeishuConfigUpdateReq) err
493493
AppID: req.AppID,
494494
AppSecret: req.AppSecret,
495495
})
496+
setFeishuPluginEnabled(conf, req.Enabled)
496497
if err := writeOpenclawConfigRaw(agent.ConfigPath, conf); err != nil {
497498
return err
498499
}
@@ -610,6 +611,13 @@ func setFeishuConfig(conf map[string]interface{}, config dto.AgentFeishuConfig)
610611
channels["feishu"] = feishu
611612
}
612613

614+
func setFeishuPluginEnabled(conf map[string]interface{}, enabled bool) {
615+
plugins := ensureChildMap(conf, "plugins")
616+
entries := ensureChildMap(plugins, "entries")
617+
feishu := ensureChildMap(entries, "feishu")
618+
feishu["enabled"] = enabled
619+
}
620+
613621
func (a AgentService) syncAgentsByAccount(account *model.AgentAccount) error {
614622
agents, err := agentRepo.List(repo.WithByAccountID(account.ID))
615623
if err != nil {

0 commit comments

Comments
 (0)