prepare_followers_synchronization_service.rb 430 B

12345678910111213
  1. # frozen_string_literal: true
  2. class ActivityPub::PrepareFollowersSynchronizationService < BaseService
  3. include JsonLdHelper
  4. def call(account, params)
  5. @account = account
  6. return if params['collectionId'] != @account.followers_url || invalid_origin?(params['url']) || @account.local_followers_hash == params['digest']
  7. ActivityPub::FollowersSynchronizationWorker.perform_async(@account.id, params['url'])
  8. end
  9. end