about summary refs log tree commit diff
path: root/app/services/fetch_remote_account_service.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-03-22 19:56:38 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-03-22 19:56:38 +0100
commit08faeedff7838e339488cfcddf02d95241557ffb (patch)
treef7f2fd55bf288b5380732b03460750e2ba519ec1 /app/services/fetch_remote_account_service.rb
parent22e06a4077bef6317e72385a05052105f3804d68 (diff)
parentd6ed2eb512f09600d7cd8150bb9b547442a9d68b (diff)
Merge branch 'feature-omnisearch'
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)