Fix handling of inlined featured
collections in ActivityPub actor objects (#34789)
This commit is contained in:
parent
3bf128e62a
commit
304c0417ed
5 changed files with 79 additions and 32 deletions
|
@ -4,13 +4,11 @@ class ActivityPub::FetchFeaturedCollectionService < BaseService
|
|||
include JsonLdHelper
|
||||
|
||||
def call(account, **options)
|
||||
return if account.featured_collection_url.blank? || account.suspended? || account.local?
|
||||
return if (account.featured_collection_url.blank? && options[:collection].blank?) || account.suspended? || account.local?
|
||||
|
||||
@account = account
|
||||
@options = options
|
||||
@json = fetch_resource(@account.featured_collection_url, true, local_follower)
|
||||
|
||||
return unless supported_context?(@json)
|
||||
@json = fetch_collection(options[:collection].presence || @account.featured_collection_url)
|
||||
|
||||
process_items(collection_items(@json))
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue