diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-11-07 15:38:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-07 15:38:55 +0100 |
commit | 5925a31b78f9eadd8daeb8e316bd6728fde547a9 (patch) | |
tree | 537684f82331b38d7f03ccfe1473a994a574f909 /app | |
parent | a70e2cd649cbd82d534f03202fb3078a4ae1af1d (diff) |
Fix followers count not being updated when migrating follows (#19998)
Fixes #19900
Diffstat (limited to 'app')
-rw-r--r-- | app/workers/move_worker.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/workers/move_worker.rb b/app/workers/move_worker.rb index c3167f9ca..3b429928e 100644 --- a/app/workers/move_worker.rb +++ b/app/workers/move_worker.rb @@ -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 |