Problem: 0 unread items are not sent
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

Solution: remove check for unread, it's not working
This commit is contained in:
Peter Stuifzand 2022-04-17 00:23:05 +02:00
parent e9c69c8eac
commit a5105b0ddb
Signed by: peter
GPG Key ID: 374322D56E5209E8

View File

@ -869,13 +869,10 @@ func (b *memoryBackend) updateChannelUnreadCount(channel string) error {
var c microsub.Channel var c microsub.Channel
c.UID = channel c.UID = channel
currentCount := c.Unread.UnreadCount
c.Unread = microsub.Unread{Type: microsub.UnreadCount, UnreadCount: unread} c.Unread = microsub.Unread{Type: microsub.UnreadCount, UnreadCount: unread}
// Sent message to Server-Sent-Events // Sent message to Server-Sent-Events
if currentCount != unread {
b.broker.Notifier <- sse.Message{Event: "new item in channel", Object: c} b.broker.Notifier <- sse.Message{Event: "new item in channel", Object: c}
}
return nil return nil
} }