1
0
Fork 0
forked from forgejo/forgejo

Add comment replies (#5104)

* Add comment replies

* Replace reviewID with review.ID
This commit is contained in:
Jonas Franz 2018-10-22 22:13:35 +02:00 committed by techknowlogick
parent 9458880c06
commit f38fce916e
6 changed files with 14 additions and 10 deletions

View file

@ -63,6 +63,9 @@ func CreateCodeComment(ctx *context.Context, form auth.CodeCommentForm) {
}
}
}
if review.ID == 0 {
review.ID = form.Reply
}
//FIXME check if line, commit and treepath exist
comment, err := models.CreateCodeComment(
ctx.User,
@ -78,7 +81,7 @@ func CreateCodeComment(ctx *context.Context, form auth.CodeCommentForm) {
return
}
// Send no notification if comment is pending
if !form.IsReview {
if !form.IsReview || form.Reply != 0 {
notification.NotifyCreateIssueComment(ctx.User, issue.Repo, issue, comment)
}