From: guillep2k <18600385+guillep2k@users.noreply.github.com> Date: Tue, 3 Sep 2019 03:39:53 +0000 (-0300) Subject: Add change title notification for issues (#8064) X-Git-Tag: v1.9.3~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5d2676089e12a74d9fb599572854cb2c8ec848f9;p=gitea.git Add change title notification for issues (#8064) --- diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 3904d29532..12c38b8620 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -1047,11 +1047,14 @@ func UpdateIssueTitle(ctx *context.Context) { return } + oldTitle := issue.Title if err := issue.ChangeTitle(ctx.User, title); err != nil { ctx.ServerError("ChangeTitle", err) return } + notification.NotifyIssueChangeTitle(ctx.User, issue, oldTitle) + ctx.JSON(200, map[string]interface{}{ "title": issue.Title, })