summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-07-06 12:09:08 +0000
committerDouwe Maan <douwe@gitlab.com>2018-07-06 12:09:08 +0000
commit34fe32740f475051dfcbb696f11c270ae327dc4a (patch)
tree74b1d7655937b11443913db5734cf769a3639dfe
parent9c720a98b9fc7a3cc35b019251c5285378c9ae18 (diff)
parent4b7f035aa86bde3b14f761b52e1634d8c13f59c2 (diff)
downloadgitlab-ce-34fe32740f475051dfcbb696f11c270ae327dc4a.tar.gz
Merge branch '6653-extract-ee-specific-files-lines-for-discussion-app-services' into 'master'
Extract EE-specific lines from NotificationService See merge request gitlab-org/gitlab-ce!20406
-rw-r--r--app/services/notification_service.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index 636cfbf5b45..8c6221af788 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -135,6 +135,8 @@ class NotificationService
# * watchers of the mr's labels
# * users with custom level checked with "new merge request"
#
+ # In EE, approvers of the merge request are also included
+ #
def new_merge_request(merge_request, current_user)
new_resource_email(merge_request, :new_merge_request_email)
end
@@ -256,6 +258,10 @@ class NotificationService
# ignore gitlab service messages
return true if note.cross_reference? && note.system?
+ send_new_note_notifications(note)
+ end
+
+ def send_new_note_notifications(note)
notify_method = "note_#{note.to_ability_name}_email".to_sym
recipients = NotificationRecipientService.build_new_note_recipients(note)