Fix followers count not being updated when migrating follows (#19998)
Fixes #19900
This commit is contained in:
parent
a70e2cd649
commit
5925a31b78
2 changed files with 18 additions and 1 deletions
|
@ -8,7 +8,9 @@ class MoveWorker
|
|||
@target_account = Account.find(target_account_id)
|
||||
|
||||
if @target_account.local? && @source_account.local?
|
||||
rewrite_follows!
|
||||
nb_moved = rewrite_follows!
|
||||
@source_account.update_count!(:followers_count, -nb_moved)
|
||||
@target_account.update_count!(:followers_count, nb_moved)
|
||||
else
|
||||
queue_follow_unfollows!
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue