mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-22 20:09:41 +01:00
update registeredChannels cache on rename as well
This commit is contained in:
parent
8a11768c6a
commit
63149e754a
@ -229,6 +229,10 @@ func (cm *ChannelManager) Rename(name string, newname string) (err error) {
|
|||||||
info = channel.ExportRegistration(IncludeInitial)
|
info = channel.ExportRegistration(IncludeInitial)
|
||||||
delete(cm.chans, cfname)
|
delete(cm.chans, cfname)
|
||||||
cm.chans[cfnewname] = entry
|
cm.chans[cfnewname] = entry
|
||||||
|
if cm.registeredChannels[cfname] {
|
||||||
|
delete(cm.registeredChannels, cfname)
|
||||||
|
cm.registeredChannels[cfnewname] = true
|
||||||
|
}
|
||||||
entry.channel.Rename(newname, cfnewname)
|
entry.channel.Rename(newname, cfnewname)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user