mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
Always add UnreadNotifications
to joined room reponses (#2793)
Fixes a minor bug, where we failed to add `UnreadNotifications` to the join response, if it wasn't in `GetUserUnreadNotificationCountsForRooms`.
This commit is contained in:
parent
fb44e33909
commit
a8bc558a60
3 changed files with 10 additions and 5 deletions
|
@ -3,6 +3,7 @@ package streams
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/matrix-org/dendrite/internal/eventutil"
|
||||
"github.com/matrix-org/dendrite/syncapi/storage"
|
||||
"github.com/matrix-org/dendrite/syncapi/types"
|
||||
)
|
||||
|
@ -53,7 +54,7 @@ func (p *NotificationDataStreamProvider) IncrementalSync(
|
|||
for roomID, jr := range req.Response.Rooms.Join {
|
||||
counts := countsByRoom[roomID]
|
||||
if counts == nil {
|
||||
continue
|
||||
counts = &eventutil.NotificationData{}
|
||||
}
|
||||
jr.UnreadNotifications = &types.UnreadNotifications{
|
||||
HighlightCount: counts.UnreadHighlightCount,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue