mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-13 07:29:30 +01:00
fix casefolding issue in NS SUSPEND DEL
NS SUSPEND DEL incorrectly required the use of the casefolded account name.
This commit is contained in:
parent
461e18f4f0
commit
6a6f104899
@ -1350,14 +1350,14 @@ func (am *AccountManager) killClients(clients []*Client) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (am *AccountManager) Unsuspend(account string) (err error) {
|
func (am *AccountManager) Unsuspend(accountName string) (err error) {
|
||||||
cfaccount, err := CasefoldName(account)
|
cfaccount, err := CasefoldName(accountName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errAccountDoesNotExist
|
return errAccountDoesNotExist
|
||||||
}
|
}
|
||||||
|
|
||||||
existsKey := fmt.Sprintf(keyAccountExists, cfaccount)
|
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 = am.server.store.Update(func(tx *buntdb.Tx) error {
|
||||||
_, err := tx.Get(existsKey)
|
_, err := tx.Get(existsKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user