summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2016-12-21 15:20:09 +0530
committerTimothy Andrew <mail@timothyandrew.net>2017-02-24 16:50:19 +0530
commit29540d6f35da643b4f1894dc5ffd4c0a22f7cd3e (patch)
tree2351f9e43d0d4fc3a5ee6914b18e2e6f6d2c12dc
parent1854c3f768d944b385be9a865deb5d869a84b7a6 (diff)
downloadgitlab-ce-29540d6f35da643b4f1894dc5ffd4c0a22f7cd3e.tar.gz
Don't send notifications to ghost users.
We already skip sending notifications to blocked users. Simply add ghost users to this list.
-rw-r--r--app/services/notification_service.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index 3734e3c4253..97db117aa99 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -466,6 +466,7 @@ class NotificationService
users = users.to_a.compact.uniq
users = users.reject(&:blocked?)
+ users = users.reject(&:ghost?)
users.reject do |user|
global_notification_setting = user.global_notification_setting