about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTakeshi Umeda <noel.yoshiba@gmail.com>2020-09-01 01:11:27 +0900
committerGitHub <noreply@github.com>2020-08-31 18:11:27 +0200
commitb1bb1906beaabe27efcba3e23e57b771d225f3a6 (patch)
tree8f3dad8d3321aff386ffd59c57f8dc053f485957
parentae871c4d46a8498a3ff5c400baa6e82174b384d0 (diff)
Fix limited follower id in fan-out-on-write service (#14709)
-rw-r--r--app/services/fan_out_on_write_service.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/services/fan_out_on_write_service.rb b/app/services/fan_out_on_write_service.rb
index 21931c2f1..e05d02cef 100644
--- a/app/services/fan_out_on_write_service.rb
+++ b/app/services/fan_out_on_write_service.rb
@@ -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