mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 10:10:08 -08:00
parent
fed5134a63
commit
3cca1e2c39
1 changed files with 7 additions and 0 deletions
|
|
@ -176,6 +176,10 @@ func (cm *ChannelManager) maybeCleanup(channel *Channel, afterJoin bool) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cm.maybeCleanupInternal(cfname, entry, afterJoin)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (cm *ChannelManager) maybeCleanupInternal(cfname string, entry *channelManagerEntry, afterJoin bool) {
|
||||||
if afterJoin {
|
if afterJoin {
|
||||||
entry.pendingJoins -= 1
|
entry.pendingJoins -= 1
|
||||||
}
|
}
|
||||||
|
|
@ -288,6 +292,9 @@ func (cm *ChannelManager) SetUnregistered(channelName string, account string) (e
|
||||||
entry.skeleton = skel
|
entry.skeleton = skel
|
||||||
cm.chans[cfname] = entry
|
cm.chans[cfname] = entry
|
||||||
}
|
}
|
||||||
|
// #1619: if the channel has 0 members and was only being retained
|
||||||
|
// because it was registered, clean it up:
|
||||||
|
cm.maybeCleanupInternal(cfname, entry, false)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue