mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 10:42:52 +01:00
fix #962
This commit is contained in:
parent
cae739fd2e
commit
f87b71b93f
@ -1174,7 +1174,12 @@ func (am *AccountManager) Unregister(account string, erase bool) error {
|
|||||||
var channelsStr string
|
var channelsStr string
|
||||||
keepProtections := false
|
keepProtections := false
|
||||||
am.server.store.Update(func(tx *buntdb.Tx) error {
|
am.server.store.Update(func(tx *buntdb.Tx) error {
|
||||||
|
// get the unfolded account name; for an active account, this is
|
||||||
|
// stored under accountNameKey, for an unregistered account under unregisteredKey
|
||||||
accountName, _ = tx.Get(accountNameKey)
|
accountName, _ = tx.Get(accountNameKey)
|
||||||
|
if accountName == "" {
|
||||||
|
accountName, _ = tx.Get(unregisteredKey)
|
||||||
|
}
|
||||||
if erase {
|
if erase {
|
||||||
tx.Delete(unregisteredKey)
|
tx.Delete(unregisteredKey)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user