about summary refs log tree commit diff
path: root/app/services/fetch_remote_account_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/fetch_remote_account_service.rb')
-rw-r--r--app/services/fetch_remote_account_service.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/services/fetch_remote_account_service.rb b/app/services/fetch_remote_account_service.rb
index baefa3a86..6a6a696d6 100644
--- a/app/services/fetch_remote_account_service.rb
+++ b/app/services/fetch_remote_account_service.rb
@@ -1,8 +1,13 @@
 # frozen_string_literal: true
 
 class FetchRemoteAccountService < BaseService
-  def call(url)
-    atom_url, body = FetchAtomService.new.call(url)
+  def call(url, prefetched_body = nil)
+    if prefetched_body.nil?
+      atom_url, body = FetchAtomService.new.call(url)
+    else
+      atom_url = url
+      body     = prefetched_body
+    end
 
     return nil if atom_url.nil?
     process_atom(atom_url, body)