Merge branch 'main' into glitch-soc/merge-upstream
This commit is contained in:
@ -0,0 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ActivityPub::AccountRawDistributionWorker < ActivityPub::RawDistributionWorker
|
||||
protected
|
||||
|
||||
def inboxes
|
||||
@inboxes ||= AccountReachFinder.new(@account).inboxes
|
||||
end
|
||||
end
|
@ -5,8 +5,10 @@ class ActivityPub::SynchronizeFeaturedCollectionWorker
|
||||
|
||||
sidekiq_options queue: 'pull', lock: :until_executed
|
||||
|
||||
def perform(account_id)
|
||||
ActivityPub::FetchFeaturedCollectionService.new.call(Account.find(account_id))
|
||||
def perform(account_id, options = {})
|
||||
options = { note: true, hashtag: false }.deep_merge(options.deep_symbolize_keys)
|
||||
|
||||
ActivityPub::FetchFeaturedCollectionService.new.call(Account.find(account_id), **options)
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
true
|
||||
end
|
||||
|
@ -0,0 +1,13 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ActivityPub::SynchronizeFeaturedTagsCollectionWorker
|
||||
include Sidekiq::Worker
|
||||
|
||||
sidekiq_options queue: 'pull', lock: :until_executed
|
||||
|
||||
def perform(account_id, url)
|
||||
ActivityPub::FetchFeaturedTagsCollectionService.new.call(Account.find(account_id), url)
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
true
|
||||
end
|
||||
end
|
@ -1,6 +1,8 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ActivityPub::UpdateDistributionWorker < ActivityPub::RawDistributionWorker
|
||||
sidekiq_options queue: 'push', lock: :until_executed
|
||||
|
||||
# Distribute an profile update to servers that might have a copy
|
||||
# of the account in question
|
||||
def perform(account_id, options = {})
|
||||
|
Reference in New Issue
Block a user