MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / GetDingTalkConfig

Method GetDingTalkConfig

agent/app/service/agents_channels.go:291–307  ·  view source on GitHub ↗
(req dto.AgentIDReq)

Source from the content-addressed store, hash-verified

289}
290
291func (a AgentService) GetDingTalkConfig(req dto.AgentIDReq) (*dto.AgentDingTalkConfig, error) {
292 agent, install, err := a.loadAgentAndInstall(req.AgentID)
293 if err != nil {
294 return nil, err
295 }
296 if agent.AgentType == constant.AppHermesAgent {
297 return readHermesDingTalkChannelConfig(path.Dir(agent.ConfigPath))
298 }
299 conf, err := readOpenclawConfig(agent.ConfigPath)
300 if err != nil {
301 return nil, err
302 }
303 result := extractDingTalkConfig(conf)
304 installed, _ := checkPluginInstalled(install.GetPath(), "dingtalk")
305 result.Installed = installed
306 return &result, nil
307}
308
309func (a AgentService) GetWeixinConfig(req dto.AgentIDReq) (*dto.AgentWeixinConfig, error) {
310 agent, _, err := a.loadAgentAndInstall(req.AgentID)

Callers

nothing calls this directly

Calls 6

loadAgentAndInstallMethod · 0.95
readOpenclawConfigFunction · 0.85
extractDingTalkConfigFunction · 0.85
checkPluginInstalledFunction · 0.85
GetPathMethod · 0.45

Tested by

no test coverage detected