Commit 734e2105 authored by http://jneen.net/'s avatar http://jneen.net/

move build_custom_key to Default

parent b010a556
...@@ -219,12 +219,6 @@ class NotificationRecipientService ...@@ -219,12 +219,6 @@ class NotificationRecipientService
recipients recipients
end 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 end
class Default < Base class Default < Base
...@@ -244,8 +238,6 @@ class NotificationRecipientService ...@@ -244,8 +238,6 @@ class NotificationRecipientService
end end
def build def build
custom_action = build_custom_key(action, target)
recipients = participants(current_user) recipients = participants(current_user)
recipients = add_project_watchers(recipients) recipients = add_project_watchers(recipients)
recipients = add_custom_notifications(recipients, custom_action) recipients = add_custom_notifications(recipients, custom_action)
...@@ -278,6 +270,12 @@ class NotificationRecipientService ...@@ -278,6 +270,12 @@ class NotificationRecipientService
recipients.uniq recipients.uniq
end 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 end
class Pipeline < Base class Pipeline < Base
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment