Commit dfc93734 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Fixed: email notification for changes I make still occurs when running…

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
parent e0bda97b
...@@ -40,6 +40,7 @@ class Mailer < ActionMailer::Base ...@@ -40,6 +40,7 @@ class Mailer < ActionMailer::Base
'Issue-Id' => issue.id, 'Issue-Id' => issue.id,
'Issue-Author' => issue.author.login 'Issue-Author' => issue.author.login
redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to
@author = journal.user
recipients issue.recipients recipients issue.recipients
# Watchers in cc # Watchers in cc
cc(issue.watcher_recipients - @recipients) cc(issue.watcher_recipients - @recipients)
...@@ -209,9 +210,10 @@ class Mailer < ActionMailer::Base ...@@ -209,9 +210,10 @@ class Mailer < ActionMailer::Base
def create_mail def create_mail
# Removes the current user from the recipients and cc # Removes the current user from the recipients and cc
# if he doesn't want to receive notifications about what he does # if he doesn't want to receive notifications about what he does
if User.current.pref[:no_self_notified] @author ||= User.current
recipients.delete(User.current.mail) if recipients if @author.pref[:no_self_notified]
cc.delete(User.current.mail) if cc recipients.delete(@author.mail) if recipients
cc.delete(@author.mail) if cc
end end
# Blind carbon copy recipients # Blind carbon copy recipients
if Setting.bcc_recipients? if Setting.bcc_recipients?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment