aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-03-11 05:11:58 -0500
committerUnknwon <u@gogs.io>2016-03-11 05:11:58 -0500
commit5267dce21023802818b0c0c16ba2ca47c146e1b5 (patch)
treea6daf82fff4e006c2fe6476db6854ce863bce5de /models
parent97c48da49fb8493059d5b52e435fadc508c78966 (diff)
downloadgitea-5267dce21023802818b0c0c16ba2ca47c146e1b5.tar.gz
gitea-5267dce21023802818b0c0c16ba2ca47c146e1b5.zip
Fix ref comment from commit create empty feed
Diffstat (limited to 'models')
-rw-r--r--models/issue_comment.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/models/issue_comment.go b/models/issue_comment.go
index ef890fd2fc..f0cc6188a0 100644
--- a/models/issue_comment.go
+++ b/models/issue_comment.go
@@ -202,9 +202,11 @@ func createComment(e *xorm.Session, opts *CreateCommentOptions) (_ *Comment, err
}
}
- // Notify watchers for whatever action comes in
- if err = notifyWatchers(e, act); err != nil {
- return nil, fmt.Errorf("notifyWatchers: %v", err)
+ // Notify watchers for whatever action comes in, ignore if no action type
+ if act.OpType > 0 {
+ if err = notifyWatchers(e, act); err != nil {
+ return nil, fmt.Errorf("notifyWatchers: %v", err)
+ }
}
return comment, nil