summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorJonas Franz <info@jonasfranz.software>2018-10-22 22:13:35 +0200
committertechknowlogick <hello@techknowlogick.com>2018-10-22 16:13:35 -0400
commitf38fce916ec92cb9ac9fe78fb5284bc8b55a726f (patch)
tree6516aead70b3ea1a95d9ff1aa42669c07a4d24dd /routers
parent9458880c068c985692a49caf608f0057c73790bf (diff)
downloadgitea-f38fce916ec92cb9ac9fe78fb5284bc8b55a726f.tar.gz
gitea-f38fce916ec92cb9ac9fe78fb5284bc8b55a726f.zip
Add comment replies (#5104)
* Add comment replies * Replace reviewID with review.ID
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/pull_review.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/routers/repo/pull_review.go b/routers/repo/pull_review.go
index 91257fea33..7576ebe90b 100644
--- a/routers/repo/pull_review.go
+++ b/routers/repo/pull_review.go
@@ -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)
}