From 9a5ae096206df2240ba042efed62854193898a65 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 31 Aug 2017 21:32:09 +0200 Subject: [PATCH] Remove identity context from output of LinkedDataSignature (#4753) --- app/lib/activitypub/linked_data_signature.rb | 2 +- spec/lib/activitypub/linked_data_signature_spec.rb | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/lib/activitypub/linked_data_signature.rb b/app/lib/activitypub/linked_data_signature.rb index 4483339a96..adb8b6cdfd 100644 --- a/app/lib/activitypub/linked_data_signature.rb +++ b/app/lib/activitypub/linked_data_signature.rb @@ -45,7 +45,7 @@ class ActivityPub::LinkedDataSignature signature = Base64.strict_encode64(creator.keypair.sign(OpenSSL::Digest::SHA256.new, to_be_signed)) - @json.merge('@context' => merge_context(@json['@context'], CONTEXT), 'signature' => options.merge('signatureValue' => signature)) + @json.merge('signature' => options.merge('signatureValue' => signature)) end private diff --git a/spec/lib/activitypub/linked_data_signature_spec.rb b/spec/lib/activitypub/linked_data_signature_spec.rb index ee4b68028a..a4d6fe8c34 100644 --- a/spec/lib/activitypub/linked_data_signature_spec.rb +++ b/spec/lib/activitypub/linked_data_signature_spec.rb @@ -63,10 +63,6 @@ RSpec.describe ActivityPub::LinkedDataSignature do expect(subject).to be_a Hash end - it 'contains signature context' do - expect(subject['@context']).to include('https://www.w3.org/ns/activitystreams', 'https://w3id.org/identity/v1') - end - it 'contains signature' do expect(subject['signature']).to be_a Hash expect(subject['signature']['signatureValue']).to be_present