mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
fix: set the existing channels unregistered
This commit is contained in:
parent
370255bec1
commit
e4c9351254
4 changed files with 23 additions and 19 deletions
|
|
@ -215,17 +215,6 @@ func (reg *ChannelRegistry) Delete(casefoldedName string, info RegisteredChannel
|
|||
})
|
||||
}
|
||||
|
||||
// deleteByAccount is a helper to delete all channel registrations corresponding to a user account.
|
||||
func (reg *ChannelRegistry) deleteByAccount(cfaccount string, cfchannels []string) {
|
||||
for _, cfchannel := range cfchannels {
|
||||
info := reg.LoadChannel(cfchannel)
|
||||
if info == nil || info.Founder != cfaccount {
|
||||
continue
|
||||
}
|
||||
reg.Delete(cfchannel, *info)
|
||||
}
|
||||
}
|
||||
|
||||
// Rename handles the persistence part of a channel rename: the channel is
|
||||
// persisted under its new name, and the old name is cleaned up if necessary.
|
||||
func (reg *ChannelRegistry) Rename(channel *Channel, casefoldedOldName string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue