Refresh the notifier - I don't like this but for some reason tests aren't happy without it :/

This commit is contained in:
Neil Alexander 2022-04-26 15:56:31 +01:00
parent de55581092
commit 8f1e01b2d6
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -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) {