summaryrefslogtreecommitdiff
path: root/app/services/notification_recipient_service.rb
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-03-17 16:07:04 -0700
committerStan Hu <stanhu@gmail.com>2017-03-17 16:07:04 -0700
commitc4c373115948def329d8221f7cbd6b67fd256901 (patch)
tree75d9029a39ddcafb34aac545d187d1275b04eb1f /app/services/notification_recipient_service.rb
parent70f1fe6915549c94ea8bdf7ab1aed9c1c364415c (diff)
downloadgitlab-ce-c4c373115948def329d8221f7cbd6b67fd256901.tar.gz
Fix changes that were removed when code moved to NotificationReceipientService
Diffstat (limited to 'app/services/notification_recipient_service.rb')
-rw-r--r--app/services/notification_recipient_service.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/services/notification_recipient_service.rb b/app/services/notification_recipient_service.rb
index 44ae23fad18..940e850600f 100644
--- a/app/services/notification_recipient_service.rb
+++ b/app/services/notification_recipient_service.rb
@@ -38,7 +38,7 @@ class NotificationRecipientService
recipients = reject_unsubscribed_users(recipients, target)
recipients = reject_users_without_access(recipients, target)
- recipients.delete(current_user) if skip_current_user
+ recipients.delete(current_user) if skip_current_user && !current_user.notified_of_own_activity?
recipients.uniq
end
@@ -47,7 +47,7 @@ class NotificationRecipientService
recipients = add_labels_subscribers([], target, labels: labels)
recipients = reject_unsubscribed_users(recipients, target)
recipients = reject_users_without_access(recipients, target)
- recipients.delete(current_user)
+ recipients.delete(current_user) unless current_user.notified_of_own_activity?
recipients.uniq
end
@@ -88,7 +88,7 @@ class NotificationRecipientService
recipients = reject_unsubscribed_users(recipients, note.noteable)
recipients = reject_users_without_access(recipients, note.noteable)
- recipients.delete(note.author)
+ recipients.delete(note.author) unless note.author.notified_of_own_activity?
recipients.uniq
end