diff options
author | pluralcafe-docker <git@plural.cafe> | 2018-11-02 00:56:08 +0000 |
---|---|---|
committer | pluralcafe-docker <git@plural.cafe> | 2018-11-02 00:56:08 +0000 |
commit | 521df92d8ccdc715b3ee9e1ccea63fbd6810f5c5 (patch) | |
tree | 3726f4f70214171ab56fc0f8803d669ce4c9efe0 /app/services/fan_out_on_write_service.rb | |
parent | 431c09bfbe07715a2a88846864179a419d72ab59 (diff) | |
parent | 34209c0340ca6b7c61de964a17f5f3fe2e0f7c7b (diff) |
Merge branch 'glitch'
Diffstat (limited to 'app/services/fan_out_on_write_service.rb')
-rw-r--r-- | app/services/fan_out_on_write_service.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/services/fan_out_on_write_service.rb b/app/services/fan_out_on_write_service.rb index 63cab8403..de7c031d8 100644 --- a/app/services/fan_out_on_write_service.rb +++ b/app/services/fan_out_on_write_service.rb @@ -61,10 +61,8 @@ class FanOutOnWriteService < BaseService def deliver_to_mentioned_followers(status) Rails.logger.debug "Delivering status #{status.id} to limited followers" - status.mentions.includes(:account).each do |mention| - mentioned_account = mention.account - next if !mentioned_account.local? || !mentioned_account.following?(status.account) || FeedManager.instance.filter?(:home, status, mention.account_id) - FeedManager.instance.push_to_home(mentioned_account, status) + FeedInsertWorker.push_bulk(status.mentions.includes(:account).map(&:account).select { |mentioned_account| mentioned_account.local? && mentioned_account.following?(status.account) }) do |follower| + [status.id, follower.id, :home] end end |