2
0

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
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