diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/accounts.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/config/accounts.go b/config/accounts.go index 3a506e6a..dbc0cdb4 100644 --- a/config/accounts.go +++ b/config/accounts.go @@ -173,8 +173,12 @@ If you want to disable STARTTLS, append +insecure to the schema. if len(Accounts) != len(accts) { return errors.New("account(s) not found") } + idx := make(map[string]int) + for i, acct := range accts { + idx[acct] = i + } sort.Slice(Accounts, func(i, j int) bool { - return strings.ToLower(accts[i]) < strings.ToLower(accts[j]) + return idx[Accounts[i].Name] < idx[Accounts[j].Name] }) } |