diff options
author | micael.bergeron <micaelbergeron@gmail.com> | 2017-10-10 14:45:43 -0400 |
---|---|---|
committer | micael.bergeron <micaelbergeron@gmail.com> | 2017-10-10 14:45:43 -0400 |
commit | e5ed2e4f4e82dcfdec4847f7d96094393a9f0839 (patch) | |
tree | 2f88d09c0d038f94ffbeb761762f160c707fa3ad /app | |
parent | f9df0e13e3224e90dcddded6d8ae4f1eabc3b6db (diff) | |
download | gitlab-ce-e5ed2e4f4e82dcfdec4847f7d96094393a9f0839.tar.gz |
fix multiple notifications from being sent for multiple labels
This also refactor the email_helper support spec to watch for multiple
emails being sent.
Diffstat (limited to 'app')
-rw-r--r-- | app/services/notification_service.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb index e2a80db06a6..b1695f348ee 100644 --- a/app/services/notification_service.rb +++ b/app/services/notification_service.rb @@ -397,7 +397,7 @@ class NotificationService end def relabeled_resource_email(target, labels, current_user, method) - recipients = labels.flat_map { |l| l.subscribers(target.project) } + recipients = labels.flat_map { |l| l.subscribers(target.project) }.uniq recipients = notifiable_users( recipients, :subscription, target: target, |