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