From e55c1d82e633c692324c9b0289ffeeb15b11e383 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 28 Apr 2008 09:25:51 +0000 Subject: Notify project members when a message is posted if they want to receive notifications for everything on the project (#1079). git-svn-id: http://redmine.rubyforge.org/svn/trunk@1368 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/message_observer.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app') diff --git a/app/models/message_observer.rb b/app/models/message_observer.rb index c26805c1b..043988172 100644 --- a/app/models/message_observer.rb +++ b/app/models/message_observer.rb @@ -21,6 +21,8 @@ class MessageObserver < ActiveRecord::Observer recipients = ([message.root] + message.root.children).collect {|m| m.author.mail if m.author && m.author.active?} # send notification to the board watchers recipients += message.board.watcher_recipients + # send notification to project members who want to be notified + recipients += message.board.project.recipients recipients = recipients.compact.uniq Mailer.deliver_message_posted(message, recipients) if !recipients.empty? && Setting.notified_events.include?('message_posted') end -- cgit v1.2.3