mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-25 13:29:27 +01:00
fix #1751
RENAME (channel rename) that was a simple case change (e.g. renaming #chan to #CHAN) would delete the channel :-|
This commit is contained in:
parent
907f82a27e
commit
5b317d4846
@ -320,9 +320,11 @@ func (cm *ChannelManager) Rename(name string, newName string) (err error) {
|
||||
defer func() {
|
||||
if channel != nil && info.Founder != "" {
|
||||
channel.Store(IncludeAllAttrs)
|
||||
// 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)
|
||||
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)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user