diff --git a/app/workers/move_worker.rb b/app/workers/move_worker.rb index a18f38556b..f8f18ad7d2 100644 --- a/app/workers/move_worker.rb +++ b/app/workers/move_worker.rb @@ -20,6 +20,7 @@ class MoveWorker copy_account_notes! carry_blocks_over! carry_mutes_over! + carry_follows_over! raise @deferred_error unless @deferred_error.nil? rescue ActiveRecord::RecordNotFound @@ -122,6 +123,14 @@ class MoveWorker end end + def carry_follows_over! + @source_account.followers.local.reorder(nil).find_each do |follower| + add_account_note_if_needed!(follower, 'move_handler.carry_follows_over_text') + rescue => e + @deferred_error = e + end + end + def add_account_note_if_needed!(account, id) unless AccountNote.exists?(account: account, target_account: @target_account) text = I18n.with_locale(account.user&.locale.presence || I18n.default_locale) do diff --git a/config/locales/en.yml b/config/locales/en.yml index 63ef106d5c..71950ccf75 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1612,6 +1612,7 @@ en: title: Moderation move_handler: carry_blocks_over_text: This user moved from %{acct}, which you had blocked. + carry_follows_over_text: This user moved from %{acct}, which you had followed. carry_mutes_over_text: This user moved from %{acct}, which you had muted. copy_account_note_text: 'This user moved from %{acct}, here were your previous notes about them:' navigation: