From 691ed8aca410e8025582579cfa8454b1e54acb12 Mon Sep 17 00:00:00 2001
From: Lin Jen-Shin <godfat@godfat.org>
Date: Wed, 14 Sep 2016 20:00:36 +0800
Subject: [PATCH] recipients should be a list of emails

---
 app/services/notification_service.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index 4fef2395c6f..d4976aa8362 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -321,10 +321,10 @@ class NotificationService
       pipeline,
       pipeline.project,
       nil, # The acting user, who won't be added to recipients
-      action: pipeline.status)
+      action: pipeline.status).map(&:email)
 
     recipients.each do |to|
-      mailer.public_send(email_template, pipeline, to.email).deliver_later
+      mailer.public_send(email_template, pipeline, to).deliver_later
     end
   end
 
-- 
GitLab