Skip to content
Snippets Groups Projects
Unverified Commit a89b02af authored by Claire's avatar Claire Committed by GitHub
Browse files

Check domain suspensions before trying to fetch resources (#24535)

parent 1ed0ff30
No related branches found
No related tags found
No related merge requests found
......@@ -2,12 +2,15 @@
class ActivityPub::FetchRemoteStatusService < BaseService
include JsonLdHelper
include DomainControlHelper
include Redisable
DISCOVERIES_PER_REQUEST = 1000
# Should be called when uri has already been checked for locality
def call(uri, id: true, prefetched_body: nil, on_behalf_of: nil, expected_actor_uri: nil, request_id: nil)
return if domain_not_allowed?(uri)
@request_id = request_id || "#{Time.now.utc.to_i}-status-#{uri}"
@json = if prefetched_body.nil?
fetch_resource(uri, id, on_behalf_of)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment