|
@@ -1174,7 +1174,12 @@ func (am *AccountManager) Unregister(account string, erase bool) error {
|
1174
|
1174
|
var channelsStr string
|
1175
|
1175
|
keepProtections := false
|
1176
|
1176
|
am.server.store.Update(func(tx *buntdb.Tx) error {
|
|
1177
|
+ // get the unfolded account name; for an active account, this is
|
|
1178
|
+ // stored under accountNameKey, for an unregistered account under unregisteredKey
|
1177
|
1179
|
accountName, _ = tx.Get(accountNameKey)
|
|
1180
|
+ if accountName == "" {
|
|
1181
|
+ accountName, _ = tx.Get(unregisteredKey)
|
|
1182
|
+ }
|
1178
|
1183
|
if erase {
|
1179
|
1184
|
tx.Delete(unregisteredKey)
|
1180
|
1185
|
} else {
|