1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 12:54:53 -05:00

Fix sending empty notifications (#19589)

- Don't send empty notifications on read notifications API.
This commit is contained in:
Gusted 2022-05-03 02:27:42 +00:00 committed by GitHub
parent 438646e0b5
commit c8ec2261a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)