Skip to content

Commit

Permalink
Fix limited follower id in fan-out-on-write service (mastodon#14709)
Browse files Browse the repository at this point in the history
  • Loading branch information
noellabo authored and thenameisnigel-old committed Sep 7, 2020
1 parent c745396 commit 05c3d97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/services/fan_out_on_write_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ def deliver_to_lists(status)
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
Expand Down

0 comments on commit 05c3d97

Please sign in to comment.