mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 03:18:24 +00:00 
			
		
		
		
	Fix sending empty notifications (#19589)
- Don't send empty notifications on read notifications API.
This commit is contained in:
		| @@ -214,7 +214,7 @@ func ReadRepoNotifications(ctx *context.APIContext) { | |||||||
| 		targetStatus = models.NotificationStatusRead | 		targetStatus = models.NotificationStatusRead | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	changed := make([]*structs.NotificationThread, len(nl)) | 	changed := make([]*structs.NotificationThread, 0, len(nl)) | ||||||
|  |  | ||||||
| 	for _, n := range nl { | 	for _, n := range nl { | ||||||
| 		notif, err := models.SetNotificationStatus(n.ID, ctx.Doer, targetStatus) | 		notif, err := models.SetNotificationStatus(n.ID, ctx.Doer, targetStatus) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user