From b31328ebd532f2af5d559bfc53f12d15ab266631 Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Sat, 19 Sep 2020 17:41:06 -0500 Subject: [Federation] Add monsterfork:refresh_application_actors task to redownload all application actors --- lib/tasks/monsterfork.rake | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib') 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 -- cgit