nas/app/workers/activate_remote_account_worker.rb
KMY(雪あすか) 2ab9ea642a
Add: #595 リモート保留中アカウントからメンションが来た場合にuriを記録し、承認時にフェッチしに行く処理 (#620)
* Add: #591 リモート保留中アカウントからメンションが来た場合にuriを記録し、承認時にフェッチしに行く処理

* Rename fetch_remove_status_worker.rb to fetch_remote_status_worker.rb

* Wip

* Add lock code
2024-02-29 12:54:47 +09:00

14 lines
349 B
Ruby

# frozen_string_literal: true
class ActivateRemoteAccountWorker
include Sidekiq::Worker
def perform(account_id)
account = Account.find_by(id: account_id)
return true if account.nil?
return true if account.suspended?
ActivateFollowRequestsService.new.call(account)
ActivateRemoteStatusesService.new.call(account)
end
end