Make protocol name/account name search case insensitive

This commit is contained in:
Alex 2020-02-28 10:39:37 +01:00
parent 8668b12a81
commit 21dc026a81

View file

@ -247,7 +247,7 @@ func handleSystemMessage(mxid string, msg string) {
func findAccount(mxid string, q string) *Account {
if accts, ok := registeredAccounts[mxid]; ok {
for name, acct := range accts {
if name == q || acct.Protocol == q {
if strings.EqualFold(name, q) || strings.EqualFold(acct.Protocol, q) {
return acct
}
}