1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-26 13:29:12 -05:00

Add change title notification for issues (#8061)

This commit is contained in:
guillep2k 2019-09-02 23:35:31 -03:00 committed by techknowlogick
parent ee11974719
commit 8ae96a37ce

View file

@ -1045,11 +1045,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,
})