about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--lib/tasks/monsterfork.rake10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/tasks/monsterfork.rake b/lib/tasks/monsterfork.rake
index b87f681fd..63ce3cd4e 100644
--- a/lib/tasks/monsterfork.rake
+++ b/lib/tasks/monsterfork.rake
@@ -26,4 +26,14 @@ namespace :monsterfork do
     ActivityPub::UpdateDistributionWorker.new.perform(Account.representative.id)
     Rails.logger.info('Done!')
   end
+
+  desc 'Update the accounts of allow-listed application and instance actors'
+  task refresh_application_actors: :environment  do
+    Account.remote.without_suspended.where(actor_type: 'Application').find_each do |account|
+      Rails.logger.info("Refetching application actor: #{account.acct}")
+      account.update!(last_webfingered_at: nil)
+      ResolveAccountService.new.call(account)
+    end
+    Rails.logger.info('Done!')
+  end
 end