mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-25 22:15:11 +01:00
Check if json body is null on Activitipub::ProcessingWorker (#26021)
This commit is contained in:
parent
bd33efdf16
commit
664b0ca8cb
@ -8,6 +8,8 @@ class ActivityPub::ProcessCollectionService < BaseService
|
|||||||
@json = original_json = Oj.load(body, mode: :strict)
|
@json = original_json = Oj.load(body, mode: :strict)
|
||||||
@options = options
|
@options = options
|
||||||
|
|
||||||
|
return unless @json.is_a?(Hash)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@json = compact(@json) if @json['signature'].is_a?(Hash)
|
@json = compact(@json) if @json['signature'].is_a?(Hash)
|
||||||
rescue JSON::LD::JsonLdError => e
|
rescue JSON::LD::JsonLdError => e
|
||||||
|
Loading…
Reference in New Issue
Block a user