3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 10:42:52 +01:00

update registeredChannels cache on rename as well

This commit is contained in:
Shivaram Lingamneni 2019-03-14 03:21:45 -04:00
parent 8a11768c6a
commit 63149e754a

View File

@ -229,6 +229,10 @@ func (cm *ChannelManager) Rename(name string, newname string) (err error) {
info = channel.ExportRegistration(IncludeInitial)
delete(cm.chans, cfname)
cm.chans[cfnewname] = entry
if cm.registeredChannels[cfname] {
delete(cm.registeredChannels, cfname)
cm.registeredChannels[cfnewname] = true
}
entry.channel.Rename(newname, cfnewname)
return nil
}