mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 18:52:41 +01:00
fix a bug in CS UNREGISTER
This commit is contained in:
parent
578ca2fdf6
commit
7cd5b8473c
@ -250,7 +250,7 @@ func (reg *ChannelRegistry) deleteChannel(tx *buntdb.Tx, key string, info Regist
|
|||||||
founder, _ := tx.Get(fmt.Sprintf(keyChannelFounder, key))
|
founder, _ := tx.Get(fmt.Sprintf(keyChannelFounder, key))
|
||||||
|
|
||||||
// to see if we're deleting the right channel, confirm the founder and the registration time
|
// to see if we're deleting the right channel, confirm the founder and the registration time
|
||||||
if founder == info.Founder && registeredAt == info.RegisteredAt {
|
if founder == info.Founder && registeredAt.Unix() == info.RegisteredAt.Unix() {
|
||||||
for _, keyFmt := range channelKeyStrings {
|
for _, keyFmt := range channelKeyStrings {
|
||||||
tx.Delete(fmt.Sprintf(keyFmt, key))
|
tx.Delete(fmt.Sprintf(keyFmt, key))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user