Skip to content

Commit

Permalink
Do not increment unread counter upon 'read' push notifications.
Browse files Browse the repository at this point in the history
  • Loading branch information
aforge committed Nov 13, 2022
1 parent 961f722 commit 2fc18d5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,13 @@ func userUpdater() {
allUids = append(allUids, uid)
}

allUnread := unreadUpdater(allUids, 1, true)
var delta int
if upd.PushRcpt.Payload.What != "read" {
delta = 1
} else {
delta = 0
}
allUnread := unreadUpdater(allUids, delta, true)
for uid, unread := range allUnread {
rcptTo := upd.PushRcpt.To[uid]
// Handle update
Expand Down

0 comments on commit 2fc18d5

Please sign in to comment.