mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 10:33:11 -06:00
Update comments
This commit is contained in:
parent
125f3e64de
commit
76e78cb6e4
|
|
@ -32,7 +32,6 @@ func (p *NotificationDataStreamProvider) IncrementalSync(
|
||||||
req *types.SyncRequest,
|
req *types.SyncRequest,
|
||||||
from, _ types.StreamPosition,
|
from, _ types.StreamPosition,
|
||||||
) types.StreamPosition {
|
) types.StreamPosition {
|
||||||
// We want counts for all possible rooms, so always start from zero.
|
|
||||||
to := p.LatestPosition(ctx)
|
to := p.LatestPosition(ctx)
|
||||||
countsByRoom, err := p.DB.GetUserUnreadNotificationCounts(ctx, req.Device.UserID, from, to)
|
countsByRoom, err := p.DB.GetUserUnreadNotificationCounts(ctx, req.Device.UserID, from, to)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -40,8 +39,7 @@ func (p *NotificationDataStreamProvider) IncrementalSync(
|
||||||
return from
|
return from
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add notification data to rooms.
|
// We're merely decorating existing rooms.
|
||||||
// Create an empty JoinResponse if the room isn't in this response
|
|
||||||
for roomID, jr := range req.Response.Rooms.Join {
|
for roomID, jr := range req.Response.Rooms.Join {
|
||||||
counts := countsByRoom[roomID]
|
counts := countsByRoom[roomID]
|
||||||
if counts == nil {
|
if counts == nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue