##// END OF EJS Templates
Now, when a user turns mail notifications off, he will still receive notifications about issue changes if he is the author or the assignee of the issue....
Jean-Philippe Lang -
r587:fd2839c833b6
parent child
Show More
@@ -30,6 +30,11 class Mailer < ActionMailer::Base
30 30 set_language_if_valid(Setting.default_language)
31 31 # Sends to all project members
32 32 @recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }.compact
33 # Sends to author and assignee (even if they turned off mail notification)
34 @recipients << issue.author.mail
35 @recipients << issue.assigned_to.mail
36 @recipients.compact!
37 @recipients.uniq!
33 38 @from = Setting.mail_from
34 39 @subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.status.name} - #{issue.subject}"
35 40 @body['issue'] = issue
@@ -39,7 +44,12 class Mailer < ActionMailer::Base
39 44 set_language_if_valid(Setting.default_language)
40 45 # Sends to all project members
41 46 issue = journal.journalized
42 @recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }.compact
47 @recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }
48 # Sends to author and assignee (even if they turned off mail notification)
49 @recipients << issue.author.mail
50 @recipients << issue.assigned_to.mail
51 @recipients.compact!
52 @recipients.uniq!
43 53 # Watchers in cc
44 54 @cc = issue.watcher_recipients - @recipients
45 55 @from = Setting.mail_from
General Comments 0
You need to be logged in to leave comments. Login now