From 89cc6aa430c65b87808ee4a159e0a80785b51935 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 9 Mar 2017 04:11:23 -0500 Subject: webhook: add issue comment event --- routers/api/v1/repo/issue_comment.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'routers/api/v1/repo/issue_comment.go') diff --git a/routers/api/v1/repo/issue_comment.go b/routers/api/v1/repo/issue_comment.go index fe94fd71..4934302f 100644 --- a/routers/api/v1/repo/issue_comment.go +++ b/routers/api/v1/repo/issue_comment.go @@ -92,8 +92,9 @@ func EditIssueComment(ctx *context.APIContext, form api.EditIssueCommentOption) return } + oldContent := comment.Content comment.Content = form.Body - if err := models.UpdateComment(comment); err != nil { + if err := models.UpdateComment(ctx.User, comment, oldContent); err != nil { ctx.Error(500, "UpdateComment", err) return } @@ -119,7 +120,7 @@ func DeleteIssueComment(ctx *context.APIContext) { return } - if err = models.DeleteCommentByID(comment.ID); err != nil { + if err = models.DeleteCommentByID(ctx.User, comment.ID); err != nil { ctx.Error(500, "DeleteCommentByID", err) return } -- cgit v1.2.3