From 76e78cb6e4d7dc642b00d81aa0ab8cd57b70162c Mon Sep 17 00:00:00 2001 From: Till Faelligen <2353100+S7evinK@users.noreply.github.com> Date: Mon, 26 Sep 2022 10:50:57 +0200 Subject: [PATCH] Update comments --- syncapi/streams/stream_notificationdata.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/syncapi/streams/stream_notificationdata.go b/syncapi/streams/stream_notificationdata.go index 7fb4a570f..c789d7a23 100644 --- a/syncapi/streams/stream_notificationdata.go +++ b/syncapi/streams/stream_notificationdata.go @@ -32,7 +32,6 @@ func (p *NotificationDataStreamProvider) IncrementalSync( req *types.SyncRequest, from, _ types.StreamPosition, ) types.StreamPosition { - // We want counts for all possible rooms, so always start from zero. to := p.LatestPosition(ctx) countsByRoom, err := p.DB.GetUserUnreadNotificationCounts(ctx, req.Device.UserID, from, to) if err != nil { @@ -40,8 +39,7 @@ func (p *NotificationDataStreamProvider) IncrementalSync( return from } - // Add notification data to rooms. - // Create an empty JoinResponse if the room isn't in this response + // We're merely decorating existing rooms. for roomID, jr := range req.Response.Rooms.Join { counts := countsByRoom[roomID] if counts == nil {