3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 10:42:52 +01:00

delete always-on modes on unregistration

This commit is contained in:
Shivaram Lingamneni 2020-06-26 18:23:33 -04:00
parent e22adf47ca
commit a38d375bda

View File

@ -1245,6 +1245,7 @@ func (am *AccountManager) Unregister(account string, erase bool) error {
joinedChannelsKey := fmt.Sprintf(keyAccountJoinedChannels, casefoldedAccount)
lastSeenKey := fmt.Sprintf(keyAccountLastSeen, casefoldedAccount)
unregisteredKey := fmt.Sprintf(keyAccountUnregistered, casefoldedAccount)
modesKey := fmt.Sprintf(keyAccountModes, casefoldedAccount)
var clients []*Client
@ -1299,6 +1300,7 @@ func (am *AccountManager) Unregister(account string, erase bool) error {
tx.Delete(channelsKey)
tx.Delete(joinedChannelsKey)
tx.Delete(lastSeenKey)
tx.Delete(modesKey)
_, err := tx.Delete(vhostQueueKey)
am.decrementVHostQueueCount(casefoldedAccount, err)