forked from forgejo/forgejo
Add comment replies (#5104)
* Add comment replies * Replace reviewID with review.ID
This commit is contained in:
parent
9458880c06
commit
f38fce916e
6 changed files with 14 additions and 10 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue