diff options
author | Unknwon <u@gogs.io> | 2016-07-16 00:36:39 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-07-16 00:36:39 +0800 |
commit | f1b8d52eb3ac230ed5a275f4a844ddb0cf48041e (patch) | |
tree | 51dda05a9fb7a985a4e91f3e1708ffddf3fee19c /routers/api | |
parent | 7ca5f8f119593023809e6130db75154597c52426 (diff) | |
download | gitea-f1b8d52eb3ac230ed5a275f4a844ddb0cf48041e.tar.gz gitea-f1b8d52eb3ac230ed5a275f4a844ddb0cf48041e.zip |
#2854 fix no mail notification when issue is closed/reopened
Diffstat (limited to 'routers/api')
-rw-r--r-- | routers/api/v1/admin/user.go | 5 | ||||
-rw-r--r-- | routers/api/v1/repo/issue.go | 4 |
2 files changed, 2 insertions, 7 deletions
diff --git a/routers/api/v1/admin/user.go b/routers/api/v1/admin/user.go index ce13804ffb..4bb24998bb 100644 --- a/routers/api/v1/admin/user.go +++ b/routers/api/v1/admin/user.go @@ -10,7 +10,6 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/modules/context" "github.com/gogits/gogs/modules/log" - "github.com/gogits/gogs/modules/mailer" "github.com/gogits/gogs/modules/setting" "github.com/gogits/gogs/routers/api/v1/convert" "github.com/gogits/gogs/routers/api/v1/user" @@ -64,9 +63,9 @@ func CreateUser(ctx *context.APIContext, form api.CreateUserOption) { } log.Trace("Account created by admin (%s): %s", ctx.User.Name, u.Name) - // Send e-mail notification. + // Send email notification. if form.SendNotify && setting.MailService != nil { - mailer.SendRegisterNotifyMail(ctx.Context.Context, u) + models.SendRegisterNotifyMail(ctx.Context.Context, u) } ctx.JSON(201, convert.ToUser(u)) diff --git a/routers/api/v1/repo/issue.go b/routers/api/v1/repo/issue.go index a80adbc356..bf2c8e9ddf 100644 --- a/routers/api/v1/repo/issue.go +++ b/routers/api/v1/repo/issue.go @@ -14,7 +14,6 @@ import ( "github.com/gogits/gogs/modules/context" "github.com/gogits/gogs/modules/setting" "github.com/gogits/gogs/routers/api/v1/convert" - "github.com/gogits/gogs/routers/repo" ) func ListIssues(ctx *context.APIContext) { @@ -80,9 +79,6 @@ func CreateIssue(ctx *context.APIContext, form api.CreateIssueOption) { if err := models.NewIssue(ctx.Repo.Repository, issue, form.Labels, nil); err != nil { ctx.Error(500, "NewIssue", err) return - } else if err := repo.MailWatchersAndMentions(ctx.Context, issue); err != nil { - ctx.Error(500, "MailWatchersAndMentions", err) - return } if form.Closed { |