From c644dd01a41714bba7b77a3f5aa7997e6eee15fd Mon Sep 17 00:00:00 2001
From: Douwe Maan <douwe@gitlab.com>
Date: Wed, 15 Apr 2015 17:07:08 +0200
Subject: [PATCH] Only send note notifications to people accessible by the note
 author.

Should not make a difference most of the time, since if they're participating in the thread, they have access to the project.
---
 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 1337dca8354..c7e45a2c2c7 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -130,9 +130,9 @@ class NotificationService
     # Add all users participating in the thread (author, assignee, comment authors)
     participants = 
       if target.is_a?(Commit)
-        target.participants(note.project)
+        target.participants(note.project, note.author)
       elsif target.respond_to?(:participants)
-        target.participants
+        target.participants(note.author)
       else
         note.mentioned_users
       end
-- 
GitLab