From a1684d1440c7a875ded0d8616e83932aa64f7b4d Mon Sep 17 00:00:00 2001 From: Heinrich Lee Yu Date: Wed, 5 Jun 2019 15:37:08 +0800 Subject: Simplify notification check for participating --- app/models/notification_setting.rb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'app/models/notification_setting.rb') diff --git a/app/models/notification_setting.rb b/app/models/notification_setting.rb index 61af5c09ae4..8306b11a7b6 100644 --- a/app/models/notification_setting.rb +++ b/app/models/notification_setting.rb @@ -54,14 +54,11 @@ class NotificationSetting < ApplicationRecord self.class.email_events(source) end - EXCLUDED_PARTICIPATING_EVENTS = [ - :success_pipeline - ].freeze - EXCLUDED_WATCHER_EVENTS = [ :push_to_merge_request, - :issue_due - ].push(*EXCLUDED_PARTICIPATING_EVENTS).freeze + :issue_due, + :success_pipeline + ].freeze def self.find_or_create_for(source) setting = find_or_initialize_by(source: source) -- cgit v1.2.1