summaryrefslogtreecommitdiff
path: root/app/models/notification_recipient.rb
diff options
context:
space:
mode:
authorEugenia Grieff <egrieff@gitlab.com>2019-06-12 15:55:09 +0000
committerNick Thomas <nick@gitlab.com>2019-06-12 15:55:09 +0000
commitef5235cb2d3491e453dc72ca2553dd5a384354ba (patch)
treea4a87fa5fa77a238c96339bb56a78f0650c81f5e /app/models/notification_recipient.rb
parent14fef15194ba7e2989aa5e9cdef85772028a8ce3 (diff)
downloadgitlab-ce-ef5235cb2d3491e453dc72ca2553dd5a384354ba.tar.gz
Resolve "Email notifications do not work properly (issue due date)"
Diffstat (limited to 'app/models/notification_recipient.rb')
-rw-r--r--app/models/notification_recipient.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/notification_recipient.rb b/app/models/notification_recipient.rb
index 9b2bbb7eba5..a7f73c0f29c 100644
--- a/app/models/notification_recipient.rb
+++ b/app/models/notification_recipient.rb
@@ -101,6 +101,7 @@ class NotificationRecipient
end
def excluded_watcher_action?
+ return false unless @type == :watch
return false unless @custom_action
NotificationSetting::EXCLUDED_WATCHER_EVENTS.include?(@custom_action)
@@ -140,7 +141,7 @@ class NotificationRecipient
return project_setting unless project_setting.nil? || project_setting.global?
- group_setting = closest_non_global_group_notification_settting
+ group_setting = closest_non_global_group_notification_setting
return group_setting unless group_setting.nil?
@@ -148,7 +149,7 @@ class NotificationRecipient
end
# Returns the notification_setting of the lowest group in hierarchy with non global level
- def closest_non_global_group_notification_settting
+ def closest_non_global_group_notification_setting
return unless @group
@group