Everything is set to DEACTIVATED but still I got notifications #456

This commit is contained in:
Karel Picman 2015-10-12 16:30:57 +02:00
parent 29ebe56d81
commit ccce95cb44

View File

@ -99,14 +99,14 @@ class DmsfMailer < Mailer
if notify_user == User.current && notify_user.pref.no_self_notified
false
else
unless notify_member.dmsf_mail_notification
if notify_member.dmsf_mail_notification.nil?
case notify_user.mail_notification
when 'all'
true
when 'selected'
notify_member.mail_notification?
when 'only_my_events', 'only_owner'
notify_user.allowed_to?(:file_manipulation, project) ? true : false
notify_user.allowed_to?(:file_manipulation, project)
else
false
end