diff options
author | Sandro Santilli <strk@kbt.io> | 2016-11-07 17:41:28 +0100 |
---|---|---|
committer | Sandro Santilli <strk@kbt.io> | 2016-11-07 17:41:28 +0100 |
commit | b3828e38a5fbb92a92bae11e1e126b87fbad09c8 (patch) | |
tree | 3b96ba9b1e42203ed295fcc0efa4e079e00dcd7d /models/mail.go | |
parent | 05fd9d3f096e53bcf80b73345d6fa567fbf017e6 (diff) | |
download | gitea-b3828e38a5fbb92a92bae11e1e126b87fbad09c8.tar.gz gitea-b3828e38a5fbb92a92bae11e1e126b87fbad09c8.zip |
more
Diffstat (limited to 'models/mail.go')
-rw-r--r-- | models/mail.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/models/mail.go b/models/mail.go index 77856553cb..04e571ae53 100644 --- a/models/mail.go +++ b/models/mail.go @@ -23,12 +23,12 @@ const ( MailAuthActivate base.TplName = "auth/activate" MailAuthActivateEmail base.TplName = "auth/activate_email" MailAuthResetPassword base.TplName = "auth/reset_passwd" - MAIL_AUTH_REGISTER_NOTIFY base.TplName = "auth/register_notify" + MailAuthRegisterNotify base.TplName = "auth/register_notify" - MAIL_ISSUE_COMMENT base.TplName = "issue/comment" - MAIL_ISSUE_MENTION base.TplName = "issue/mention" + MailIssueComment base.TplName = "issue/comment" + MailIssueMention base.TplName = "issue/mention" - MAIL_NOTIFY_COLLABORATOR base.TplName = "notify/collaborator" + MailNotifyCollaborator base.TplName = "notify/collaborator" ) type MailRender interface { @@ -109,7 +109,7 @@ func SendRegisterNotifyMail(c *macaron.Context, u *User) { data := map[string]interface{}{ "Username": u.DisplayName(), } - body, err := mailRender.HTMLString(string(MAIL_AUTH_REGISTER_NOTIFY), data) + body, err := mailRender.HTMLString(string(MailAuthRegisterNotify), data) if err != nil { log.Error(3, "HTMLString: %v", err) return @@ -131,7 +131,7 @@ func SendCollaboratorMail(u, doer *User, repo *Repository) { "RepoName": repoName, "Link": repo.HTMLURL(), } - body, err := mailRender.HTMLString(string(MAIL_NOTIFY_COLLABORATOR), data) + body, err := mailRender.HTMLString(string(MailNotifyCollaborator), data) if err != nil { log.Error(3, "HTMLString: %v", err) return @@ -171,7 +171,7 @@ func SendIssueCommentMail(issue *Issue, doer *User, tos []string) { return } - mailer.SendAsync(composeIssueMessage(issue, doer, MAIL_ISSUE_COMMENT, tos, "issue comment")) + mailer.SendAsync(composeIssueMessage(issue, doer, MailIssueComment, tos, "issue comment")) } // SendIssueMentionMail composes and sends issue mention emails to target receivers. @@ -179,5 +179,5 @@ func SendIssueMentionMail(issue *Issue, doer *User, tos []string) { if len(tos) == 0 { return } - mailer.SendAsync(composeIssueMessage(issue, doer, MAIL_ISSUE_MENTION, tos, "issue mention")) + mailer.SendAsync(composeIssueMessage(issue, doer, MailIssueMention, tos, "issue mention")) } |