@@ -27,7 +27,7 @@ func NewNotifier() base.Notifier {
2727}
2828
2929func (m * mailNotifier ) NotifyCreateIssueComment (doer * models.User , repo * models.Repository ,
30- issue * models.Issue , comment * models.Comment ) {
30+ issue * models.Issue , comment * models.Comment , mentions [] * models. User ) {
3131 var act models.ActionType
3232 if comment .Type == models .CommentTypeClose {
3333 act = models .ActionCloseIssue
@@ -41,13 +41,13 @@ func (m *mailNotifier) NotifyCreateIssueComment(doer *models.User, repo *models.
4141 act = 0
4242 }
4343
44- if err := mailer .MailParticipantsComment (comment , act , issue ); err != nil {
44+ if err := mailer .MailParticipantsComment (comment , act , issue , mentions ); err != nil {
4545 log .Error ("MailParticipantsComment: %v" , err )
4646 }
4747}
4848
49- func (m * mailNotifier ) NotifyNewIssue (issue * models.Issue ) {
50- if err := mailer .MailParticipants (issue , issue .Poster , models .ActionCreateIssue ); err != nil {
49+ func (m * mailNotifier ) NotifyNewIssue (issue * models.Issue , mentions [] * models. User ) {
50+ if err := mailer .MailParticipants (issue , issue .Poster , models .ActionCreateIssue , mentions ); err != nil {
5151 log .Error ("MailParticipants: %v" , err )
5252 }
5353}
@@ -69,18 +69,18 @@ func (m *mailNotifier) NotifyIssueChangeStatus(doer *models.User, issue *models.
6969 }
7070 }
7171
72- if err := mailer .MailParticipants (issue , doer , actionType ); err != nil {
72+ if err := mailer .MailParticipants (issue , doer , actionType , nil ); err != nil {
7373 log .Error ("MailParticipants: %v" , err )
7474 }
7575}
7676
77- func (m * mailNotifier ) NotifyNewPullRequest (pr * models.PullRequest ) {
78- if err := mailer .MailParticipants (pr .Issue , pr .Issue .Poster , models .ActionCreatePullRequest ); err != nil {
77+ func (m * mailNotifier ) NotifyNewPullRequest (pr * models.PullRequest , mentions [] * models. User ) {
78+ if err := mailer .MailParticipants (pr .Issue , pr .Issue .Poster , models .ActionCreatePullRequest , mentions ); err != nil {
7979 log .Error ("MailParticipants: %v" , err )
8080 }
8181}
8282
83- func (m * mailNotifier ) NotifyPullRequestReview (pr * models.PullRequest , r * models.Review , comment * models.Comment ) {
83+ func (m * mailNotifier ) NotifyPullRequestReview (pr * models.PullRequest , r * models.Review , comment * models.Comment , mentions [] * models. User ) {
8484 var act models.ActionType
8585 if comment .Type == models .CommentTypeClose {
8686 act = models .ActionCloseIssue
@@ -89,11 +89,17 @@ func (m *mailNotifier) NotifyPullRequestReview(pr *models.PullRequest, r *models
8989 } else if comment .Type == models .CommentTypeComment {
9090 act = models .ActionCommentPull
9191 }
92- if err := mailer .MailParticipantsComment (comment , act , pr .Issue ); err != nil {
92+ if err := mailer .MailParticipantsComment (comment , act , pr .Issue , mentions ); err != nil {
9393 log .Error ("MailParticipantsComment: %v" , err )
9494 }
9595}
9696
97+ func (m * mailNotifier ) NotifyPullRequestCodeComment (pr * models.PullRequest , comment * models.Comment , mentions []* models.User ) {
98+ if err := mailer .MailMentionsComment (pr , comment , mentions ); err != nil {
99+ log .Error ("MailMentionsComment: %v" , err )
100+ }
101+ }
102+
97103func (m * mailNotifier ) NotifyIssueChangeAssignee (doer * models.User , issue * models.Issue , assignee * models.User , removed bool , comment * models.Comment ) {
98104 // mail only sent to added assignees and not self-assignee
99105 if ! removed && doer .ID != assignee .ID && assignee .EmailNotifications () == models .EmailNotificationsEnabled {
@@ -115,7 +121,7 @@ func (m *mailNotifier) NotifyMergePullRequest(pr *models.PullRequest, doer *mode
115121 return
116122 }
117123 pr .Issue .Content = ""
118- if err := mailer .MailParticipants (pr .Issue , doer , models .ActionMergePullRequest ); err != nil {
124+ if err := mailer .MailParticipants (pr .Issue , doer , models .ActionMergePullRequest , nil ); err != nil {
119125 log .Error ("MailParticipants: %v" , err )
120126 }
121127}
@@ -143,7 +149,7 @@ func (m *mailNotifier) NotifyPullRequestPushCommits(doer *models.User, pr *model
143149 }
144150 comment .Content = ""
145151
146- m .NotifyCreateIssueComment (doer , comment .Issue .Repo , comment .Issue , comment )
152+ m .NotifyCreateIssueComment (doer , comment .Issue .Repo , comment .Issue , comment , nil )
147153}
148154
149155func (m * mailNotifier ) NotifyNewRelease (rel * models.Release ) {
0 commit comments