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

Function normalizeDefaultAccount

agent/app/service/agents_channels.go:1512–1522  ·  view source on GitHub ↗
(defaultAccount string, accountIDs []string)

Source from the content-addressed store, hash-verified

1510}
1511
1512func normalizeDefaultAccount(defaultAccount string, accountIDs []string) string {
1513 if len(accountIDs) == 0 {
1514 return ""
1515 }
1516 for _, accountID := range accountIDs {
1517 if accountID == defaultAccount {
1518 return defaultAccount
1519 }
1520 }
1521 return accountIDs[0]
1522}
1523
1524func getTelegramBotAccountIDs(bots []dto.AgentTelegramBot) []string {
1525 accountIDs := make([]string, 0, len(bots))

Callers 4

extractTelegramConfigFunction · 0.85
setTelegramConfigFunction · 0.85
extractDiscordConfigFunction · 0.85
setDiscordConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected