Export interaction policies for local posts over ActivityPub (#35697)

This commit is contained in:
Claire 2025-08-06 13:31:36 +02:00 committed by GitHub
parent 6f6e7d8d49
commit c8f263c419
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 35 additions and 1 deletions

View file

@ -56,4 +56,19 @@ RSpec.describe ActivityPub::NoteSerializer do
})
end
end
context 'with a quote policy', feature: :outgoing_quotes do
let(:parent) { Fabricate(:status, quote_approval_policy: Status::QUOTE_APPROVAL_POLICY_FLAGS[:followers] << 16) }
it 'has the expected shape' do
expect(subject).to include({
'type' => 'Note',
'interactionPolicy' => a_hash_including(
'canQuote' => a_hash_including(
'automaticApproval' => [ActivityPub::TagManager.instance.followers_uri_for(parent.account)]
)
),
})
end
end
end