diff options
author | Andrey Nering <andrey.nering@gmail.com> | 2016-12-30 14:44:54 -0200 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2016-12-31 00:44:54 +0800 |
commit | 42904cb98a4b8e7accdac90bc9f06347cb0521f7 (patch) | |
tree | ff7b39817584c93ad9afd2d2136f51f5d4ddb0a0 /routers/repo/issue.go | |
parent | 37eec6c9b7056e1e05d0067aef86d2e61d67f757 (diff) | |
download | gitea-42904cb98a4b8e7accdac90bc9f06347cb0521f7.tar.gz gitea-42904cb98a4b8e7accdac90bc9f06347cb0521f7.zip |
Notification - Step 1 (#523)
* Notification - Step 1
* Add copyright headers
* Cache issue and repository on notification model
Diffstat (limited to 'routers/repo/issue.go')
-rw-r--r-- | routers/repo/issue.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 6eeb5bef50..049eac06c3 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -24,6 +24,7 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/markdown" + "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/setting" ) @@ -467,6 +468,8 @@ func NewIssuePost(ctx *context.Context, form auth.CreateIssueForm) { return } + notification.Service.NotifyIssue(issue, ctx.User.ID) + log.Trace("Issue created: %d/%d", repo.ID, issue.ID) ctx.Redirect(ctx.Repo.RepoLink + "/issues/" + com.ToStr(issue.Index)) } @@ -931,6 +934,8 @@ func NewComment(ctx *context.Context, form auth.CreateCommentForm) { return } + notification.Service.NotifyIssue(issue, ctx.User.ID) + log.Trace("Comment created: %d/%d/%d", ctx.Repo.Repository.ID, issue.ID, comment.ID) } |