Add event 'delete channel'
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
1144c615da
commit
330931742b
|
@ -63,6 +63,11 @@ type channelMessage struct {
|
|||
Channel microsub.Channel `json:"channel"`
|
||||
}
|
||||
|
||||
type channelDeletedMessage struct {
|
||||
Version int `json:"version"`
|
||||
UID string `json:"uid"`
|
||||
}
|
||||
|
||||
type newItemMessage struct {
|
||||
Item microsub.Item `json:"item"`
|
||||
Channel string `json:"channel"`
|
||||
|
@ -262,6 +267,8 @@ func (b *memoryBackend) ChannelsDelete(uid string) error {
|
|||
delete(b.Feeds, uid)
|
||||
b.lock.Unlock()
|
||||
|
||||
b.broker.Notifier <- sse.Message{Event: "delete channel", Object: channelDeletedMessage{1, uid}}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user