about summary refs log tree commit diff
path: root/app/services/activitypub/fetch_remote_account_service.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-08-14 02:29:36 +0200
committerGitHub <noreply@github.com>2017-08-14 02:29:36 +0200
commit4e75f0d88932511ad154773f4c77a485367ed36c (patch)
tree3b0656542633fc80ac7b657d8ee2694ca8bc2fdc /app/services/activitypub/fetch_remote_account_service.rb
parenta2aeacbfeed5dc7070c37a22bb2c4bac1a58a526 (diff)
Hook up URL-based resource look-up to ActivityPub (#4589)
Diffstat (limited to 'app/services/activitypub/fetch_remote_account_service.rb')
-rw-r--r--app/services/activitypub/fetch_remote_account_service.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/activitypub/fetch_remote_account_service.rb b/app/services/activitypub/fetch_remote_account_service.rb
index e443b9463..3eeca585e 100644
--- a/app/services/activitypub/fetch_remote_account_service.rb
+++ b/app/services/activitypub/fetch_remote_account_service.rb
@@ -5,8 +5,8 @@ class ActivityPub::FetchRemoteAccountService < BaseService
 
   # Should be called when uri has already been checked for locality
   # Does a WebFinger roundtrip on each call
-  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?