diff options
author | Stan Hu <stanhu@gmail.com> | 2017-03-15 21:50:20 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-03-15 21:51:08 +0300 |
commit | 203bb0bc546cfa99272a858426904030d9292615 (patch) | |
tree | 18f68a88f9225b054e96992040bb69ddf09b0400 /app/services/notification_service.rb | |
parent | ba9ea195f87a99ffa2662c8f273599f16dca4478 (diff) |
Revert "Merge branch 'option-to-be-notified-of-own-activity' into 'master'
This reverts commit 5e9666880376b3f53edb95cba77b5642d3cc1810, reversing
changes made to b35378a938e22f745b6c6ea32b53cb50f9b6c627.
Diffstat (limited to 'app/services/notification_service.rb')
-rw-r--r-- | app/services/notification_service.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb index d12692ecc90..fdaba9b95fb 100644 --- a/app/services/notification_service.rb +++ b/app/services/notification_service.rb @@ -217,7 +217,7 @@ class NotificationService recipients = reject_unsubscribed_users(recipients, note.noteable) recipients = reject_users_without_access(recipients, note.noteable) - recipients.delete(note.author) unless note.author.notified_of_own_activity? + recipients.delete(note.author) recipients = recipients.uniq notify_method = "note_#{note.to_ability_name}_email".to_sym @@ -327,9 +327,8 @@ class NotificationService recipients ||= build_recipients( pipeline, pipeline.project, - pipeline.user, - action: pipeline.status, - skip_current_user: false).map(&:notification_email) + nil, # The acting user, who won't be added to recipients + action: pipeline.status).map(&:notification_email) if recipients.any? mailer.public_send(email_template, pipeline, recipients).deliver_later @@ -628,7 +627,7 @@ class NotificationService recipients = reject_unsubscribed_users(recipients, target) recipients = reject_users_without_access(recipients, target) - recipients.delete(current_user) if skip_current_user && !current_user.notified_of_own_activity? + recipients.delete(current_user) if skip_current_user recipients.uniq end @@ -637,7 +636,7 @@ class NotificationService recipients = add_labels_subscribers([], project, target, labels: labels) recipients = reject_unsubscribed_users(recipients, target) recipients = reject_users_without_access(recipients, target) - recipients.delete(current_user) unless current_user.notified_of_own_activity? + recipients.delete(current_user) recipients.uniq end |