mirror of
https://github.com/ergochat/ergo.git
synced 2025-10-06 10:37:22 +02:00
commit
128142ca41
@ -320,10 +320,12 @@ func (cm *ChannelManager) Rename(name string, newName string) (err error) {
|
|||||||
defer func() {
|
defer func() {
|
||||||
if channel != nil && info.Founder != "" {
|
if channel != nil && info.Founder != "" {
|
||||||
channel.Store(IncludeAllAttrs)
|
channel.Store(IncludeAllAttrs)
|
||||||
|
if oldCfname != newCfname {
|
||||||
// we just flushed the channel under its new name, therefore this delete
|
// we just flushed the channel under its new name, therefore this delete
|
||||||
// cannot be overwritten by a write to the old name:
|
// cannot be overwritten by a write to the old name:
|
||||||
cm.server.channelRegistry.Delete(info)
|
cm.server.channelRegistry.Delete(info)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
cm.Lock()
|
cm.Lock()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user