1
0
Fork 0
forked from External/ergo
RENAME (channel rename) that was a simple case change (e.g.
renaming #chan to #CHAN) would delete the channel :-|
This commit is contained in:
Shivaram Lingamneni 2021-07-13 08:47:16 -04:00
parent a09ea9a506
commit c55d861a72

View file

@ -320,10 +320,12 @@ func (cm *ChannelManager) Rename(name string, newName string) (err error) {
defer func() {
if channel != nil && info.Founder != "" {
channel.Store(IncludeAllAttrs)
if oldCfname != newCfname {
// we just flushed the channel under its new name, therefore this delete
// cannot be overwritten by a write to the old name:
cm.server.channelRegistry.Delete(info)
}
}
}()
cm.Lock()