Ignore empty response in ActivityPub::FetchRemoteStatusService (#4661)
* Ignore empty response in ActivityPub::FetchRemoteStatusService This fixes `NoMethodError: undefined method `[]' for nil:NilClass` error. * Check json.nil? in JsonLdHelper#supported_context?
This commit is contained in:
@ -82,7 +82,7 @@ class FetchAtomService < BaseService
|
||||
|
||||
def supported_activity?(body)
|
||||
json = body_to_json(body)
|
||||
return false if json.nil? || !supported_context?(json)
|
||||
return false unless supported_context?(json)
|
||||
json['type'] == 'Person' ? json['inbox'].present? : true
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user