summaryrefslogtreecommitdiff
path: root/app/models/notification_recipient.rb
diff options
context:
space:
mode:
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