From 8f1e01b2d675e421f4b4bea43f8a0783cb6cd054 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 26 Apr 2022 15:56:31 +0100 Subject: [PATCH] Refresh the notifier - I don't like this but for some reason tests aren't happy without it :/ --- syncapi/streams/stream_presence.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/syncapi/streams/stream_presence.go b/syncapi/streams/stream_presence.go index 45ef07608..e9c739b32 100644 --- a/syncapi/streams/stream_presence.go +++ b/syncapi/streams/stream_presence.go @@ -111,6 +111,12 @@ func (p *PresenceStreamProvider) populatePresence( } } + // TODO: This is expensive, why do we do this? + if err := p.notifier.Load(ctx, p.DB); err != nil { + req.Log.WithError(err).Error("unable to refresh notifier lists") + return err + } + for _, presence := range presences { // Ignore users we don't share a room with if req.Device.UserID != presence.UserID && !p.notifier.IsSharedUser(req.Device.UserID, presence.UserID) {