summaryrefslogtreecommitdiffstats
path: root/modules/notification/indexer
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-10-30 18:02:46 +0800
committerLauris BH <lauris@nix.lv>2019-10-30 12:02:46 +0200
commitac6accef092ea5a983a4a8ee35282246fc3c6fc5 (patch)
tree2a44c0198dd6e2f9c06eaa49603fd3d28793e1fa /modules/notification/indexer
parentf694bb45d79dcc093bc6332eabb3af063bc6b088 (diff)
downloadgitea-ac6accef092ea5a983a4a8ee35282246fc3c6fc5.tar.gz
gitea-ac6accef092ea5a983a4a8ee35282246fc3c6fc5.zip
Move webhook codes from service to webhook notification (#8712)
* Move webhook codes from service to webhook notification * move deletecomment webhook to notifications * fix notification
Diffstat (limited to 'modules/notification/indexer')
-rw-r--r--modules/notification/indexer/indexer.go5
1 files changed, 5 insertions, 0 deletions
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++ {