[#200] fix sending message to pull assignee

This commit is contained in:
Alexander Machehin 2013-07-10 01:56:49 +06:00
parent 38ced2c998
commit d692b6d450
1 changed files with 2 additions and 3 deletions

View File

@ -18,7 +18,7 @@ module Modules::Observers::ActivityFeed::Issue
collect_recipients.each do |recipient|
next if user_id == recipient.id
if recipient.notifier.can_notify && recipient.notifier.new_issue && assignee_id != recipient.id
UserMailer.new_issue_notification(self, recipient).deliver
UserMailer.new_issue_notification(self, recipient).deliver
end
ActivityFeed.create(
:user => recipient,
@ -35,12 +35,11 @@ module Modules::Observers::ActivityFeed::Issue
}
)
end
# dont remove outdated issues link
Comment.create_link_on_issues_from_item(self)
end
def send_assign_notifications(action = :create)
if assignee_id && assignee_id_changed?
if(action == :create && assignee_id) || assignee_id_changed?
if assignee.notifier.issue_assign && assignee.notifier.can_notify
UserMailer.issue_assign_notification(self, assignee).deliver
end