(defaultAccount string, accountIDs []string)
| 1510 | } |
| 1511 | |
| 1512 | func 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 | |
| 1524 | func getTelegramBotAccountIDs(bots []dto.AgentTelegramBot) []string { |
| 1525 | accountIDs := make([]string, 0, len(bots)) |
no outgoing calls
no test coverage detected