about summary refs log tree commit diff
path: root/app/lib/activitypub/activity
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-09-29 16:23:13 +0200
committerGitHub <noreply@github.com>2019-09-29 16:23:13 +0200
commit368a87755b4b12c37deb415e10e03c709012f698 (patch)
treef76c97df7f3ea63122af24f6181dd5d9eb6f1c56 /app/lib/activitypub/activity
parentbd9685f7980838ecc675af20cf52ef1e686d98d6 (diff)
Fix account migration not affecting followers on origin server (#11980)
Diffstat (limited to 'app/lib/activitypub/activity')
-rw-r--r--app/lib/activitypub/activity/move.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/lib/activitypub/activity/move.rb b/app/lib/activitypub/activity/move.rb
index 6c6a2b967..12bb82d25 100644
--- a/app/lib/activitypub/activity/move.rb
+++ b/app/lib/activitypub/activity/move.rb
@@ -19,11 +19,7 @@ class ActivityPub::Activity::Move < ActivityPub::Activity
     origin_account.update(moved_to_account: target_account)
 
     # Initiate a re-follow for each follower
-    origin_account.followers.local.select(:id).find_in_batches do |follower_accounts|
-      UnfollowFollowWorker.push_bulk(follower_accounts.map(&:id)) do |follower_account_id|
-        [follower_account_id, origin_account.id, target_account.id]
-      end
-    end
+    MoveWorker.perform_async(origin_account.id, target_account.id)
   end
 
   private