about summary refs log tree commit diff
path: root/app/services/resolve_url_service.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-12-19 16:07:21 +0100
committerGitHub <noreply@github.com>2019-12-19 16:07:21 +0100
commitf064cd4fb8057af04f0f1db6a98fc45935811e25 (patch)
tree33375e965ba16e3491f3bc3cd733ff2331a48220 /app/services/resolve_url_service.rb
parent66ab1f83b0d342341181e0c88da83c966391fc0c (diff)
parentdace054c0680b3ac6e0da31f3ffa501cd8840fbf (diff)
Merge pull request #1255 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/services/resolve_url_service.rb')
-rw-r--r--app/services/resolve_url_service.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/app/services/resolve_url_service.rb b/app/services/resolve_url_service.rb
index 4e971a4b8..79b1bad0c 100644
--- a/app/services/resolve_url_service.rb
+++ b/app/services/resolve_url_service.rb
@@ -19,9 +19,9 @@ class ResolveURLService < BaseService
 
   def process_url
     if equals_or_includes_any?(type, ActivityPub::FetchRemoteAccountService::SUPPORTED_TYPES)
-      FetchRemoteAccountService.new.call(resource_url, body, protocol)
+      ActivityPub::FetchRemoteAccountService.new.call(resource_url, prefetched_body: body)
     elsif equals_or_includes_any?(type, ActivityPub::Activity::Create::SUPPORTED_TYPES + ActivityPub::Activity::Create::CONVERTED_TYPES)
-      status = FetchRemoteStatusService.new.call(resource_url, body, protocol)
+      status = FetchRemoteStatusService.new.call(resource_url, body)
       authorize_with @on_behalf_of, status, :show? unless status.nil?
       status
     elsif fetched_resource.nil? && @on_behalf_of.present?
@@ -45,12 +45,8 @@ class ResolveURLService < BaseService
     fetched_resource.second[:prefetched_body]
   end
 
-  def protocol
-    fetched_resource.third
-  end
-
   def type
-    return json_data['type'] if protocol == :activitypub
+    json_data['type']
   end
 
   def json_data