Hook up URL-based resource look-up to ActivityPub (#4589)
This commit is contained in:
parent
a2aeacbfee
commit
4e75f0d889
8 changed files with 95 additions and 60 deletions
|
@ -4,8 +4,8 @@ class ActivityPub::FetchRemoteStatusService < BaseService
|
|||
include JsonLdHelper
|
||||
|
||||
# Should be called when uri has already been checked for locality
|
||||
def call(uri)
|
||||
@json = fetch_resource(uri)
|
||||
def call(uri, prefetched_json = nil)
|
||||
@json = body_to_json(prefetched_json) || fetch_resource(uri)
|
||||
|
||||
return unless supported_context? && expected_type?
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue