diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-10-29 00:45:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-29 00:45:43 +0800 |
commit | af8957bc4ce78613fe03cb1abc6c961dd67ff344 (patch) | |
tree | b17b15eddca01c46d53d38abf184a2450e557de4 /routers/repo/issue.go | |
parent | e3875ace913ca428804acc9a9ee1cd0b06cd8026 (diff) | |
download | gitea-af8957bc4ce78613fe03cb1abc6c961dd67ff344.tar.gz gitea-af8957bc4ce78613fe03cb1abc6c961dd67ff344.zip |
Move issue notifications (#8713)
Diffstat (limited to 'routers/repo/issue.go')
-rw-r--r-- | routers/repo/issue.go | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 9c313e56d4..12ff0a054c 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -574,7 +574,7 @@ func NewIssuePost(ctx *context.Context, form auth.CreateIssueForm) { Content: form.Content, Ref: form.Ref, } - if err := issue_service.NewIssue(repo, issue, labelIDs, attachments); err != nil { + if err := issue_service.NewIssue(repo, issue, labelIDs, attachments, assigneeIDs); err != nil { if models.IsErrUserDoesNotHaveAccessToRepo(err) { ctx.Error(400, "UserDoesNotHaveAccessToRepo", err.Error()) return @@ -583,13 +583,6 @@ func NewIssuePost(ctx *context.Context, form auth.CreateIssueForm) { return } - if err := issue_service.AddAssignees(issue, ctx.User, assigneeIDs); err != nil { - log.Error("AddAssignees: %v", err) - ctx.Flash.Error(ctx.Tr("issues.assignee.error")) - } - - notification.NotifyNewIssue(issue) - log.Trace("Issue created: %d/%d", repo.ID, issue.ID) ctx.Redirect(ctx.Repo.RepoLink + "/issues/" + com.ToStr(issue.Index)) } |