@@ -190,9 +190,9 class Issue < ActiveRecord::Base | |||
|
190 | 190 | # Returns the mail adresses of users that should be notified for the issue |
|
191 | 191 | def recipients |
|
192 | 192 | recipients = project.recipients |
|
193 | # Author and assignee are always notified | |
|
194 | recipients << author.mail if author | |
|
195 | recipients << assigned_to.mail if assigned_to | |
|
193 | # Author and assignee are always notified unless they have been locked | |
|
194 | recipients << author.mail if author && author.active? | |
|
195 | recipients << assigned_to.mail if assigned_to && assigned_to.active? | |
|
196 | 196 | recipients.compact.uniq |
|
197 | 197 | end |
|
198 | 198 |
@@ -18,7 +18,7 | |||
|
18 | 18 | class MessageObserver < ActiveRecord::Observer |
|
19 | 19 | def after_create(message) |
|
20 | 20 | # send notification to the authors of the thread |
|
21 | recipients = ([message.root] + message.root.children).collect {|m| m.author.mail if m.author} | |
|
21 | recipients = ([message.root] + message.root.children).collect {|m| m.author.mail if m.author && m.author.active?} | |
|
22 | 22 | # send notification to the board watchers |
|
23 | 23 | recipients += message.board.watcher_recipients |
|
24 | 24 | recipients = recipients.compact.uniq |
General Comments 0
You need to be logged in to leave comments.
Login now