Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-07-29 06:00:32 +0300
committerDouwe Maan <douwe@selenight.nl>2016-07-29 06:00:32 +0300
commitac6b634d9e1afb36c8ebb0d84cd23465fe4b0f84 (patch)
treebde86426b2dbfc059c4c27d770f4b9d3187c7da6 /app/services/notification_service.rb
parentfa4a613517a4a236ea5e98a1964e52c8b4eef595 (diff)
Send notification email when all discussions are resolved
Diffstat (limited to 'app/services/notification_service.rb')
-rw-r--r--app/services/notification_service.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index ab6e51209ee..69871883afb 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -120,6 +120,14 @@ class NotificationService
)
end
+ def resolve_all_discussions(merge_request, current_user)
+ recipients = build_recipients(merge_request, merge_request.target_project, current_user, action: "resolve_all_discussions")
+
+ recipients.each do |recipient|
+ mailer.resolved_all_discussions_email(recipient.id, merge_request.id, current_user.id).deliver_later
+ end
+ end
+
# Notify new user with email after creation
def new_user(user, token = nil)
# Don't email omniauth created users
@@ -177,7 +185,7 @@ class NotificationService
# build notify method like 'note_commit_email'
notify_method = "note_#{note.noteable_type.underscore}_email".to_sym
-
+
recipients.each do |recipient|
mailer.send(notify_method, recipient.id, note.id).deliver_later
end