diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-01-03 18:26:45 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-01-03 18:26:45 +0000 |
commit | e1ef9a5c7214404cc916b752a39c2d0f24d61d35 (patch) | |
tree | 1cd89aab80dda12b22b0213d090976999a0010ff /app | |
parent | f3babef54ab4c5b1262d98e1f1aa14a06e066c64 (diff) | |
download | redmine-e1ef9a5c7214404cc916b752a39c2d0f24d61d35.tar.gz redmine-e1ef9a5c7214404cc916b752a39c2d0f24d61d35.zip |
fixed: no recipient if one of the members of the project has disabled mail notifications
git-svn-id: http://redmine.rubyforge.org/svn/trunk@145 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/mailer.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 07047c594..968beb49e 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -21,7 +21,7 @@ class Mailer < ActionMailer::Base def issue_add(issue) # Sends to all project members - @recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification } + @recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }.compact @from = $RDM_MAIL_FROM @subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.status.name} - #{issue.subject}" @body['issue'] = issue
@@ -30,7 +30,7 @@ class Mailer < ActionMailer::Base def issue_edit(journal)
# Sends to all project members
issue = journal.journalized
- @recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }
+ @recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }.compact
@from = $RDM_MAIL_FROM
@subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.status.name} - #{issue.subject}"
@body['issue'] = issue
|