From ac6accef092ea5a983a4a8ee35282246fc3c6fc5 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 30 Oct 2019 18:02:46 +0800 Subject: Move webhook codes from service to webhook notification (#8712) * Move webhook codes from service to webhook notification * move deletecomment webhook to notifications * fix notification --- modules/notification/indexer/indexer.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules/notification/indexer') diff --git a/modules/notification/indexer/indexer.go b/modules/notification/indexer/indexer.go index 453eb0c295..13baa76ac0 100644 --- a/modules/notification/indexer/indexer.go +++ b/modules/notification/indexer/indexer.go @@ -74,6 +74,11 @@ func (r *indexerNotifier) NotifyUpdateComment(doer *models.User, c *models.Comme func (r *indexerNotifier) NotifyDeleteComment(doer *models.User, comment *models.Comment) { if comment.Type == models.CommentTypeComment { + if err := comment.LoadIssue(); err != nil { + log.Error("LoadIssue: %v", err) + return + } + var found bool if comment.Issue.Comments != nil { for i := 0; i < len(comment.Issue.Comments); i++ { -- cgit v1.2.3