about summary refs log tree commit diff
path: root/app/workers
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2017-07-31 22:19:13 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-07-31 15:19:13 +0200
commit3e7a541e09ac875be21bea3cf8a444e3228d2a4c (patch)
tree616d749117905fd68bb35762a208382b0cc1fa20 /app/workers
parent93aafa85496b5e1ae735e174157c3a7e1744ede2 (diff)
Change RuboCop rules to loose (#4464)
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/pubsubhubbub/distribution_worker.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/workers/pubsubhubbub/distribution_worker.rb b/app/workers/pubsubhubbub/distribution_worker.rb
index ce467d18b..ea246128d 100644
--- a/app/workers/pubsubhubbub/distribution_worker.rb
+++ b/app/workers/pubsubhubbub/distribution_worker.rb
@@ -14,7 +14,7 @@ class Pubsubhubbub::DistributionWorker
     @subscriptions = active_subscriptions.to_a
 
     distribute_public!(stream_entries.reject(&:hidden?))
-    distribute_hidden!(stream_entries.reject { |s| !s.hidden? })
+    distribute_hidden!(stream_entries.select(&:hidden?))
   end
 
   private
@@ -35,7 +35,7 @@ class Pubsubhubbub::DistributionWorker
     @payload = OStatus::AtomSerializer.render(OStatus::AtomSerializer.new.feed(@account, stream_entries))
     @domains = @account.followers.domains
 
-    Pubsubhubbub::DeliveryWorker.push_bulk(@subscriptions.reject { |s| !allowed_to_receive?(s.callback_url, s.domain) }) do |subscription|
+    Pubsubhubbub::DeliveryWorker.push_bulk(@subscriptions.select { |s| allowed_to_receive?(s.callback_url, s.domain) }) do |subscription|
       [subscription.id, @payload]
     end
   end