(req dto.AgentTelegramConfigReq)
| 91 | } |
| 92 | |
| 93 | func (a AgentService) GetTelegramConfig(req dto.AgentTelegramConfigReq) (*dto.AgentTelegramConfig, error) { |
| 94 | agent, _, err := a.loadAgentAndInstall(req.AgentID) |
| 95 | if err != nil { |
| 96 | return nil, err |
| 97 | } |
| 98 | if agent.AgentType == constant.AppHermesAgent { |
| 99 | return readHermesTelegramChannelConfig(path.Dir(agent.ConfigPath)) |
| 100 | } |
| 101 | conf, err := readOpenclawConfig(agent.ConfigPath) |
| 102 | if err != nil { |
| 103 | return nil, err |
| 104 | } |
| 105 | result := extractTelegramConfig(conf) |
| 106 | return &result, nil |
| 107 | } |
| 108 | |
| 109 | func (a AgentService) UpdateTelegramConfig(req dto.AgentTelegramConfigUpdateReq) error { |
| 110 | agent, install, err := a.loadAgentAndInstall(req.AgentID) |
nothing calls this directly
no test coverage detected