aboutsummaryrefslogtreecommitdiffstats
path: root/routers/repo/issue.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/issue.go')
-rw-r--r--routers/repo/issue.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index 33ba3e0d64..18ab1691cd 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -1086,6 +1086,7 @@ func UpdateCommentContent(ctx *context.Context) {
return
}
+ oldContent := comment.Content
comment.Content = ctx.Query("content")
if len(comment.Content) == 0 {
ctx.JSON(200, map[string]interface{}{
@@ -1093,7 +1094,7 @@ func UpdateCommentContent(ctx *context.Context) {
})
return
}
- if err = models.UpdateComment(comment); err != nil {
+ if err = models.UpdateComment(ctx.User, comment, oldContent); err != nil {
ctx.ServerError("UpdateComment", err)
return
}
@@ -1119,7 +1120,7 @@ func DeleteComment(ctx *context.Context) {
return
}
- if err = models.DeleteComment(comment); err != nil {
+ if err = models.DeleteComment(ctx.User, comment); err != nil {
ctx.ServerError("DeleteCommentByID", err)
return
}