Fix account migration not affecting followers on origin server (#11980)

This commit is contained in:
Eugen Rochko
2019-09-29 16:23:13 +02:00
committed by GitHub
parent bd9685f798
commit 368a87755b
4 changed files with 67 additions and 8 deletions

View File

@ -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