aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
Diffstat (limited to 'routers')
-rw-r--r--routers/api/v1/repo/issue_comment.go6
-rw-r--r--routers/repo/issue.go4
2 files changed, 10 insertions, 0 deletions
diff --git a/routers/api/v1/repo/issue_comment.go b/routers/api/v1/repo/issue_comment.go
index a3fc6f41f3..720513f007 100644
--- a/routers/api/v1/repo/issue_comment.go
+++ b/routers/api/v1/repo/issue_comment.go
@@ -283,6 +283,9 @@ func editIssueComment(ctx *context.APIContext, form api.EditIssueCommentOption)
ctx.Error(500, "UpdateComment", err)
return
}
+
+ notification.NotifyUpdateComment(ctx.User, comment, oldContent)
+
ctx.JSON(200, comment.APIFormat())
}
@@ -371,5 +374,8 @@ func deleteIssueComment(ctx *context.APIContext) {
ctx.Error(500, "DeleteCommentByID", err)
return
}
+
+ notification.NotifyDeleteComment(ctx.User, comment)
+
ctx.Status(204)
}
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index f025cc3887..6c6c2612bf 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -1232,6 +1232,8 @@ func UpdateCommentContent(ctx *context.Context) {
return
}
+ notification.NotifyUpdateComment(ctx.User, comment, oldContent)
+
ctx.JSON(200, map[string]interface{}{
"content": string(markdown.Render([]byte(comment.Content), ctx.Query("context"), ctx.Repo.Repository.ComposeMetas())),
})
@@ -1263,6 +1265,8 @@ func DeleteComment(ctx *context.Context) {
return
}
+ notification.NotifyDeleteComment(ctx.User, comment)
+
ctx.Status(200)
}