1
1
mirror of https://github.com/go-gitea/gitea synced 2025-09-10 18:58:27 +00:00

Reload issue when sending webhook to make num comments is right. (#35243) (#35248)

Backport #35243 by @lunny

Fix #35229

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
Giteabot
2025-08-12 01:12:47 +08:00
committed by GitHub
parent 04114c637a
commit 4e0269e890
3 changed files with 8 additions and 10 deletions

View File

@@ -445,6 +445,7 @@ func (m *webhookNotifier) DeleteComment(ctx context.Context, doer *user_model.Us
log.Error("LoadPoster: %v", err)
return
}
comment.Issue = nil // reload issue to ensure it has the latest data, especially the number of comments
if err = comment.LoadIssue(ctx); err != nil {
log.Error("LoadIssue: %v", err)
return