Fix handling of inlined featured
collections in ActivityPub actor objects (#34789)
This commit is contained in:
parent
3bf128e62a
commit
304c0417ed
5 changed files with 79 additions and 32 deletions
|
@ -83,6 +83,27 @@ RSpec.describe ActivityPub::ProcessAccountService do
|
|||
end
|
||||
end
|
||||
|
||||
context 'with inlined feature collection' do
|
||||
let(:payload) do
|
||||
{
|
||||
id: 'https://foo.test',
|
||||
type: 'Actor',
|
||||
inbox: 'https://foo.test/inbox',
|
||||
featured: {
|
||||
type: 'OrderedCollection',
|
||||
orderedItems: ['https://example.com/statuses/1'],
|
||||
},
|
||||
}.deep_stringify_keys
|
||||
end
|
||||
|
||||
it 'queues featured collection synchronization', :aggregate_failures do
|
||||
account = subject.call('alice', 'example.com', payload)
|
||||
|
||||
expect(account.featured_collection_url).to eq ''
|
||||
expect(ActivityPub::SynchronizeFeaturedCollectionWorker).to have_enqueued_sidekiq_job(account.id, { 'hashtag' => true, 'request_id' => anything, 'collection' => payload['featured'] })
|
||||
end
|
||||
end
|
||||
|
||||
context 'when account is not suspended' do
|
||||
subject { described_class.new.call(account.username, account.domain, payload) }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue