Better checks for previous commit.

This commit is contained in:
Felix Schäfer 2011-11-30 18:08:36 +01:00
parent f333f43a57
commit 42363c32f7
1 changed files with 2 additions and 2 deletions

View File

@ -396,8 +396,8 @@ class Mailer < ActionMailer::Base
# if he doesn't want to receive notifications about what he does
@author ||= User.current
if @author.pref[:no_self_notified]
recipients((recipients.is_a?(Array) ? recipients : [recipients]) - [@author.mail]) if recipients
cc((cc.is_a?(Array) ? cc : [cc]) - [@author.mail]) if cc
recipients((recipients.is_a?(Array) ? recipients : [recipients]) - [@author.mail]) if recipients.present?
cc((cc.is_a?(Array) ? cc : [cc]) - [@author.mail]) if cc.present?
end
notified_users = [recipients, cc].flatten.compact.uniq