|
|
|
@ -600,6 +600,39 @@ RSpec.describe ActivityPub::ProcessStatusUpdateService do
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
context 'when the status keeps an unverifiable quote and removes text through an explicit update' do
|
|
|
|
|
|
|
|
let(:quoted_account) { Fabricate(:account, domain: 'quoted.example.com') }
|
|
|
|
|
|
|
|
let(:quoted_status) { Fabricate(:status, account: quoted_account) }
|
|
|
|
|
|
|
|
let!(:quote) { Fabricate(:quote, status: status, quoted_status: quoted_status) }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let(:payload) do
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
'@context': [
|
|
|
|
|
|
|
|
'https://www.w3.org/ns/activitystreams',
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
'@id': 'https://w3id.org/fep/044f#quote',
|
|
|
|
|
|
|
|
'@type': '@id',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
'@id': 'https://w3id.org/fep/044f#quoteAuthorization',
|
|
|
|
|
|
|
|
'@type': '@id',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
id: 'foo',
|
|
|
|
|
|
|
|
type: 'Note',
|
|
|
|
|
|
|
|
summary: 'Show more',
|
|
|
|
|
|
|
|
updated: '2021-09-08T22:39:25Z',
|
|
|
|
|
|
|
|
quote: ActivityPub::TagManager.instance.uri_for(quoted_status),
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it 'updates the approval URI but does not verify the quote' do
|
|
|
|
|
|
|
|
expect { subject.call(status, json, json) }
|
|
|
|
|
|
|
|
.to change(status, :text).to('')
|
|
|
|
|
|
|
|
.and not_change(quote, :state).from('pending')
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
context 'when the status has an existing verified quote and removes an approval link through an explicit update' do
|
|
|
|
context 'when the status has an existing verified quote and removes an approval link through an explicit update' do
|
|
|
|
let(:quoted_account) { Fabricate(:account, domain: 'quoted.example.com') }
|
|
|
|
let(:quoted_account) { Fabricate(:account, domain: 'quoted.example.com') }
|
|
|
|
let(:quoted_status) { Fabricate(:status, account: quoted_account) }
|
|
|
|
let(:quoted_status) { Fabricate(:status, account: quoted_account) }
|
|
|
|
|