Remove channel from Redis when channels is deleted
This commit is contained in:
parent
9e4c93a389
commit
7d7d55099e
|
@ -189,6 +189,12 @@ func (b *memoryBackend) ChannelsUpdate(uid, name string) microsub.Channel {
|
||||||
func (b *memoryBackend) ChannelsDelete(uid string) {
|
func (b *memoryBackend) ChannelsDelete(uid string) {
|
||||||
defer b.save()
|
defer b.save()
|
||||||
|
|
||||||
|
conn := pool.Get()
|
||||||
|
defer conn.Close()
|
||||||
|
|
||||||
|
conn.Do("SREM", "channels", uid)
|
||||||
|
conn.Do("DEL", "channel_sortorder_"+uid)
|
||||||
|
|
||||||
delete(b.Channels, uid)
|
delete(b.Channels, uid)
|
||||||
delete(b.Feeds, uid)
|
delete(b.Feeds, uid)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user