1
0

fetch_remote_status_service.rb 446 B

1234567891011121314
  1. # frozen_string_literal: true
  2. class FetchRemoteStatusService < BaseService
  3. def call(url, prefetched_body = nil)
  4. if prefetched_body.nil?
  5. resource_url, resource_options = FetchResourceService.new.call(url)
  6. else
  7. resource_url = url
  8. resource_options = { prefetched_body: prefetched_body }
  9. end
  10. ActivityPub::FetchRemoteStatusService.new.call(resource_url, **resource_options) unless resource_url.nil?
  11. end
  12. end