mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
14 lines
430 B
Ruby
14 lines
430 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
class ActivityPub::PrepareFollowersSynchronizationService < BaseService
|
||
|
include JsonLdHelper
|
||
|
|
||
|
def call(account, params)
|
||
|
@account = account
|
||
|
|
||
|
return if params['collectionId'] != @account.followers_url || invalid_origin?(params['url']) || @account.local_followers_hash == params['digest']
|
||
|
|
||
|
ActivityPub::FollowersSynchronizationWorker.perform_async(@account.id, params['url'])
|
||
|
end
|
||
|
end
|