diff options
author | http://jneen.net/ <jneen@jneen.net> | 2017-07-20 12:37:36 -0700 |
---|---|---|
committer | http://jneen.net/ <jneen@jneen.net> | 2017-08-03 09:06:15 -0700 |
commit | 734e21054a71be06aec897404d95b0905e6ed6c7 (patch) | |
tree | a4744535863f49d386cb5359cb08f33671b8271f | |
parent | b010a556b6b0314b333eb13ecc7095dc361f67a2 (diff) | |
download | gitlab-ce-734e21054a71be06aec897404d95b0905e6ed6c7.tar.gz |
move build_custom_key to Default
-rw-r--r-- | app/services/notification_recipient_service.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/app/services/notification_recipient_service.rb b/app/services/notification_recipient_service.rb index edad4ff021a..3b7a13ffed6 100644 --- a/app/services/notification_recipient_service.rb +++ b/app/services/notification_recipient_service.rb @@ -219,12 +219,6 @@ class NotificationRecipientService recipients end - - # Build event key to search on custom notification level - # Check NotificationSetting::EMAIL_EVENTS - def build_custom_key(action, object) - "#{action}_#{object.class.model_name.name.underscore}".to_sym - end end class Default < Base @@ -244,8 +238,6 @@ class NotificationRecipientService end def build - custom_action = build_custom_key(action, target) - recipients = participants(current_user) recipients = add_project_watchers(recipients) recipients = add_custom_notifications(recipients, custom_action) @@ -278,6 +270,12 @@ class NotificationRecipientService recipients.uniq end + + # Build event key to search on custom notification level + # Check NotificationSetting::EMAIL_EVENTS + def custom_action + @custom_action ||= "#{action}_#{target.class.model_name.name.underscore}".to_sym + end end class Pipeline < Base |