Fix processing of compacted single-item JSON-LD collections (#28816)

This commit is contained in:
Claire 2024-01-19 13:43:10 +01:00 committed by GitHub
parent 3593ee2e36
commit cf2a2ed71c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 51 additions and 9 deletions

View file

@ -69,7 +69,7 @@ class Keys::QueryService < BaseService
return if json['items'].blank?
@devices = json['items'].map do |device|
@devices = as_array(json['items']).map do |device|
Device.new(device_id: device['id'], name: device['name'], identity_key: device.dig('identityKey', 'publicKeyBase64'), fingerprint_key: device.dig('fingerprintKey', 'publicKeyBase64'), claim_url: device['claim'])
end
rescue HTTP::Error, OpenSSL::SSL::SSLError, Mastodon::Error => e