Browse Source

Fix limited follower id in fan-out-on-write service (#14709)

master
Takeshi Umeda 3 years ago
committed by GitHub
parent
commit
b1bb1906be
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      app/services/fan_out_on_write_service.rb

+ 3
- 3
app/services/fan_out_on_write_service.rb View File

@ -58,9 +58,9 @@ class FanOutOnWriteService < BaseService
def deliver_to_mentioned_followers(status)
Rails.logger.debug "Delivering status #{status.id} to limited followers"
status.mentions.joins(:account).merge(status.account.followers_for_local_distribution).select(:id).reorder(nil).find_in_batches do |followers|
FeedInsertWorker.push_bulk(followers) do |follower|
[status.id, follower.id, :home]
status.mentions.joins(:account).merge(status.account.followers_for_local_distribution).select(:id, :account_id).reorder(nil).find_in_batches do |mentions|
FeedInsertWorker.push_bulk(mentions) do |mention|
[status.id, mention.account_id, :home]
end
end
end

Loading…
Cancel
Save