diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-10-10 17:13:09 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-10-10 17:13:09 +0000 |
commit | 0c78056a69cc3bee7fb1cd3261046995db55bfdf (patch) | |
tree | 67883c68edad43b2e6f96e9ea8b864370a6b207c /app/models/message.rb | |
parent | 5533eeff239e024539f3ddd5b2ffe3528144beef (diff) | |
download | redmine-0c78056a69cc3bee7fb1cd3261046995db55bfdf.tar.gz redmine-0c78056a69cc3bee7fb1cd3261046995db55bfdf.zip |
Send emails asynchronously (#26791).
Custom async_* delivery methods are removed in favor of ActiveJob (Async by default).
git-svn-id: http://svn.redmine.org/redmine/trunk@17588 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/message.rb')
-rw-r--r-- | app/models/message.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/message.rb b/app/models/message.rb index 758095289..83e8cd2c0 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -45,7 +45,7 @@ class Message < ActiveRecord::Base after_create :add_author_as_watcher, :reset_counters! after_update :update_messages_board after_destroy :reset_counters! - after_create :send_notification + after_create_commit :send_notification scope :visible, lambda {|*args| joins(:board => :project). @@ -114,7 +114,7 @@ class Message < ActiveRecord::Base def send_notification if Setting.notified_events.include?('message_posted') - Mailer.message_posted(self).deliver + Mailer.deliver_message_posted(self) end end end |