summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/services/notification_recipient_service.rb14
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