diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-01-03 16:03:12 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-01-03 16:03:12 +0000 |
commit | dfc937340d6be370c619da0ca203b94c1194e581 (patch) | |
tree | bcf14cb296a72be4815cc1d3f85079da17ad6b29 /app/models/mailer.rb | |
parent | e0bda97b6f9379782f246a15365eba713eb75d53 (diff) | |
download | redmine-dfc937340d6be370c619da0ca203b94c1194e581.tar.gz redmine-dfc937340d6be370c619da0ca203b94c1194e581.zip |
Fixed: email notification for changes I make still occurs when running Repository.fetch_changesets (#1957).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2225 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/mailer.rb')
-rw-r--r-- | app/models/mailer.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/models/mailer.rb b/app/models/mailer.rb index dd4b5be87..9a0f3a501 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -40,6 +40,7 @@ class Mailer < ActionMailer::Base 'Issue-Id' => issue.id, 'Issue-Author' => issue.author.login redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to + @author = journal.user recipients issue.recipients # Watchers in cc cc(issue.watcher_recipients - @recipients) @@ -209,9 +210,10 @@ class Mailer < ActionMailer::Base def create_mail # Removes the current user from the recipients and cc # if he doesn't want to receive notifications about what he does - if User.current.pref[:no_self_notified] - recipients.delete(User.current.mail) if recipients - cc.delete(User.current.mail) if cc + @author ||= User.current + if @author.pref[:no_self_notified] + recipients.delete(@author.mail) if recipients + cc.delete(@author.mail) if cc end # Blind carbon copy recipients if Setting.bcc_recipients? |