mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-24 19:23:41 +01:00
parent
6c40e567aa
commit
965345316f
2 changed files with 5 additions and 0 deletions
|
@ -9,12 +9,15 @@ class Request
|
|||
include RoutingHelper
|
||||
|
||||
def initialize(verb, url, **options)
|
||||
raise ArgumentError if url.blank?
|
||||
|
||||
@verb = verb
|
||||
@url = Addressable::URI.parse(url).normalize
|
||||
@options = options.merge(use_proxy? ? Rails.configuration.x.http_client_proxy : { socket_class: Socket })
|
||||
@headers = {}
|
||||
|
||||
raise Mastodon::HostValidationError, 'Instance does not support hidden service connections' if block_hidden_service?
|
||||
|
||||
set_common_headers!
|
||||
set_digest! if options.key?(:body)
|
||||
end
|
||||
|
|
|
@ -4,6 +4,8 @@ class ActivityPub::FetchFeaturedCollectionService < BaseService
|
|||
include JsonLdHelper
|
||||
|
||||
def call(account)
|
||||
return if account.featured_collection_url.blank?
|
||||
|
||||
@account = account
|
||||
@json = fetch_resource(@account.featured_collection_url, true)
|
||||
|
||||
|
|
Loading…
Reference in a new issue