Forum notifications are now also sent to the authors of the thread, even if they don't watch the board.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@607 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
5bd26ede42
commit
c4fee11969
|
@ -17,8 +17,11 @@
|
|||
|
||||
class MessageObserver < ActiveRecord::Observer
|
||||
def after_create(message)
|
||||
# send notification to board watchers
|
||||
recipients = message.board.watcher_recipients
|
||||
# send notification to the authors of the thread
|
||||
recipients = ([message.root] + message.root.children).collect {|m| m.author.mail if m.author}
|
||||
# send notification to the board watchers
|
||||
recipients += message.board.watcher_recipients
|
||||
recipients = recipients.compact.uniq
|
||||
Mailer.deliver_message_posted(message, recipients) unless recipients.empty?
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue