3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-11 06:29:29 +01:00

Merge pull request #1382 from slingamn/unsuspend_bug

fix casefolding issue in NS SUSPEND DEL
This commit is contained in:
Shivaram Lingamneni 2020-11-11 09:14:28 -08:00 committed by GitHub
commit 7cfb298617
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1350,14 +1350,14 @@ func (am *AccountManager) killClients(clients []*Client) {
}
}
func (am *AccountManager) Unsuspend(account string) (err error) {
cfaccount, err := CasefoldName(account)
func (am *AccountManager) Unsuspend(accountName string) (err error) {
cfaccount, err := CasefoldName(accountName)
if err != nil {
return errAccountDoesNotExist
}
existsKey := fmt.Sprintf(keyAccountExists, cfaccount)
suspensionKey := fmt.Sprintf(keyAccountSuspended, account)
suspensionKey := fmt.Sprintf(keyAccountSuspended, cfaccount)
err = am.server.store.Update(func(tx *buntdb.Tx) error {
_, err := tx.Get(existsKey)
if err != nil {