From 56a40a2b6548d57c2c2a32b34a76c157ae5fdeab Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Tue, 1 Aug 2017 13:26:55 -0700 Subject: [PATCH] rm unused methods --- .../notification_recipient_service.rb | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/app/services/notification_recipient_service.rb b/app/services/notification_recipient_service.rb index 0e1527c1a7a..5d394f67631 100644 --- a/app/services/notification_recipient_service.rb +++ b/app/services/notification_recipient_service.rb @@ -199,32 +199,6 @@ module NotificationRecipientService ) end - def reject_unsubscribed_users - return unless target.respond_to? :subscriptions - - recipients.reject! do |recipient| - user = recipient.user - subscription = target.subscriptions.find_by_user_id(user.id) - subscription && !subscription.subscribed - end - end - - def reject_users_without_access - recipients.select! { |r| r.user.can?(:receive_notifications) } - - return unless read_ability - - DeclarativePolicy.subject_scope do - recipients.select! do |recipient| - recipient.user.can?(read_ability, target) - end - end - end - - def reject_user(user) - recipients.reject! { |r| r.user == user } - end - def add_labels_subscribers(labels: nil) return unless target.respond_to? :labels