Skip to content

Commit 82f24be

Browse files
author
Gusted
authored
Fix sending empty notifications (#19589) (#19590)
- Backport #19589 - Don't send empty notifications on read notifications API.
1 parent 88da506 commit 82f24be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/api/v1/notify/repo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ func ReadRepoNotifications(ctx *context.APIContext) {
214214
targetStatus = models.NotificationStatusRead
215215
}
216216

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

219219
for _, n := range nl {
220220
notif, err := models.SetNotificationStatus(n.ID, ctx.User, targetStatus)

0 commit comments

Comments
 (0)