@@ -23,12 +23,12 @@ const (
23
23
MailAuthActivate base.TplName = "auth/activate"
24
24
MailAuthActivateEmail base.TplName = "auth/activate_email"
25
25
MailAuthResetPassword base.TplName = "auth/reset_passwd"
26
- MAIL_AUTH_REGISTER_NOTIFY base.TplName = "auth/register_notify"
26
+ MailAuthRegisterNotify base.TplName = "auth/register_notify"
27
27
28
- MAIL_ISSUE_COMMENT base.TplName = "issue/comment"
29
- MAIL_ISSUE_MENTION base.TplName = "issue/mention"
28
+ MailIssueComment base.TplName = "issue/comment"
29
+ MailIssueMention base.TplName = "issue/mention"
30
30
31
- MAIL_NOTIFY_COLLABORATOR base.TplName = "notify/collaborator"
31
+ MailNotifyCollaborator base.TplName = "notify/collaborator"
32
32
)
33
33
34
34
type MailRender interface {
@@ -109,7 +109,7 @@ func SendRegisterNotifyMail(c *macaron.Context, u *User) {
109
109
data := map [string ]interface {}{
110
110
"Username" : u .DisplayName (),
111
111
}
112
- body , err := mailRender .HTMLString (string (MAIL_AUTH_REGISTER_NOTIFY ), data )
112
+ body , err := mailRender .HTMLString (string (MailAuthRegisterNotify ), data )
113
113
if err != nil {
114
114
log .Error (3 , "HTMLString: %v" , err )
115
115
return
@@ -131,7 +131,7 @@ func SendCollaboratorMail(u, doer *User, repo *Repository) {
131
131
"RepoName" : repoName ,
132
132
"Link" : repo .HTMLURL (),
133
133
}
134
- body , err := mailRender .HTMLString (string (MAIL_NOTIFY_COLLABORATOR ), data )
134
+ body , err := mailRender .HTMLString (string (MailNotifyCollaborator ), data )
135
135
if err != nil {
136
136
log .Error (3 , "HTMLString: %v" , err )
137
137
return
@@ -171,13 +171,13 @@ func SendIssueCommentMail(issue *Issue, doer *User, tos []string) {
171
171
return
172
172
}
173
173
174
- mailer .SendAsync (composeIssueMessage (issue , doer , MAIL_ISSUE_COMMENT , tos , "issue comment" ))
174
+ mailer .SendAsync (composeIssueMessage (issue , doer , MailIssueComment , tos , "issue comment" ))
175
175
}
176
176
177
177
// SendIssueMentionMail composes and sends issue mention emails to target receivers.
178
178
func SendIssueMentionMail (issue * Issue , doer * User , tos []string ) {
179
179
if len (tos ) == 0 {
180
180
return
181
181
}
182
- mailer .SendAsync (composeIssueMessage (issue , doer , MAIL_ISSUE_MENTION , tos , "issue mention" ))
182
+ mailer .SendAsync (composeIssueMessage (issue , doer , MailIssueMention , tos , "issue mention" ))
183
183
}
0 commit comments