Skip to content

Commit

Permalink
Fix sending empty notifications (#19589)
Browse files Browse the repository at this point in the history
- Don't send empty notifications on read notifications API.
  • Loading branch information
Gusted authored May 3, 2022
1 parent 438646e commit c8ec226
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routers/api/v1/notify/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func ReadRepoNotifications(ctx *context.APIContext) {
targetStatus = models.NotificationStatusRead
}

changed := make([]*structs.NotificationThread, len(nl))
changed := make([]*structs.NotificationThread, 0, len(nl))

for _, n := range nl {
notif, err := models.SetNotificationStatus(n.ID, ctx.Doer, targetStatus)
Expand Down

0 comments on commit c8ec226

Please sign in to comment.