Mail handler: add watchers before sending notification (#2245).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2195 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2008-12-28 14:48:23 +00:00
parent 35f5e36838
commit 94b04383f9
1 changed files with 2 additions and 3 deletions

View File

@ -93,11 +93,10 @@ class MailHandler < ActionMailer::Base
issue.save!
add_attachments(issue)
logger.info "MailHandler: issue ##{issue.id} created by #{user}" if logger && logger.info
# send notification before adding watchers since they were cc'ed
Mailer.deliver_issue_add(issue) if Setting.notified_events.include?('issue_added')
# add To and Cc as watchers
add_watchers(issue)
# send notification after adding watchers so that they can reply to Redmine
Mailer.deliver_issue_add(issue) if Setting.notified_events.include?('issue_added')
issue
end