The code powering m.abunchtell.com https://m.abunchtell.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

15 lines
446 B

  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