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

Function getDefaultFeishuBot

agent/app/service/agents_channels.go:1589–1611  ·  view source on GitHub ↗
(bots []dto.AgentFeishuBot)

Source from the content-addressed store, hash-verified

1587}
1588
1589func getDefaultFeishuBot(bots []dto.AgentFeishuBot) dto.AgentFeishuBot {
1590 for _, bot := range bots {
1591 if bot.IsDefault || bot.AccountID == "default" {
1592 bot.IsDefault = true
1593 if bot.Name == "" {
1594 bot.Name = "Default"
1595 }
1596 return bot
1597 }
1598 }
1599 if len(bots) > 0 {
1600 bot := bots[0]
1601 bot.IsDefault = true
1602 if bot.AccountID == "" {
1603 bot.AccountID = "default"
1604 }
1605 if bot.Name == "" {
1606 bot.Name = "Default"
1607 }
1608 return bot
1609 }
1610 return defaultFeishuBot()
1611}
1612
1613func getDefaultQQBot(bots []dto.AgentQQBotBot) dto.AgentQQBotBot {
1614 for _, bot := range bots {

Callers 1

setFeishuConfigFunction · 0.85

Calls 1

defaultFeishuBotFunction · 0.85

Tested by

no test coverage detected