Commit 04cc7515 authored by http://jneen.net/'s avatar http://jneen.net/

approvals: don't instantiate NotificationRecipientService

parent dcdadb24
......@@ -414,7 +414,7 @@ class NotificationService
end
def approve_mr_email(merge_request, project, current_user)
recipients = NotificationRecipientService.new(project).build_recipients(merge_request, current_user, action: 'approve')
recipients = NotificationRecipientService.build_recipients(merge_request, current_user, action: 'approve')
recipients.each do |recipient|
mailer.approved_merge_request_email(recipient.id, merge_request.id, current_user.id).deliver_later
......@@ -422,7 +422,7 @@ class NotificationService
end
def unapprove_mr_email(merge_request, project, current_user)
recipients = NotificationRecipientService.new(project).build_recipients(merge_request, current_user, action: 'unapprove')
recipients = NotificationRecipientService.build_recipients(merge_request, current_user, action: 'unapprove')
recipients.each do |recipient|
mailer.unapproved_merge_request_email(recipient.id, merge_request.id, current_user.id).deliver_later
......
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