]> source.dussan.org Git - redmine.git/commitdiff
Mail handler: add watchers before sending notification (#2245).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 28 Dec 2008 14:48:23 +0000 (14:48 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 28 Dec 2008 14:48:23 +0000 (14:48 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2195 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/mail_handler.rb

index a7264d483bbe80c9c8a116260fc5690c4cf01273..d7fbfbaf1cc15fd79c8c0f4c7f642720f636bc90 100644 (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