This commit is contained in:
Till Faelligen 2022-09-26 15:36:11 +02:00
parent eedfc4a1fb
commit db07e9b365
No known key found for this signature in database
GPG key ID: 3DF82D8AB9211D4E

View file

@ -32,6 +32,8 @@ func (p *NotificationDataStreamProvider) IncrementalSync(
req *types.SyncRequest,
from, _ types.StreamPosition,
) types.StreamPosition {
// Always get the latest data, as this might have advanced while waiting
// for other streams to prepare their responses and add/updated notifications.
to := p.LatestPosition(ctx)
countsByRoom, err := p.DB.GetUserUnreadNotificationCounts(ctx, req.Device.UserID, from, to)
if err != nil {