Merge pull request #462 from kmycode/upstream-20240115

Upstream 20240115
This commit is contained in:
KMY(雪あすか) 2024-01-15 19:58:03 +09:00 committed by GitHub
commit 90bd2a0f00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
341 changed files with 1113 additions and 558 deletions

View file

@ -86,9 +86,5 @@ RSpec.describe ReblogService, type: :service do
it 'distributes to followers' do
expect(ActivityPub::DistributionWorker).to have_received(:perform_async)
end
it 'sends an announce activity to the author', :sidekiq_inline do
expect(a_request(:post, bob.inbox_url)).to have_been_made.once
end
end
end

View file

@ -169,4 +169,22 @@ RSpec.describe RemoveStatusService, :sidekiq_inline, type: :service do
)).to have_been_made.once
end
end
context 'when removed status is a reblog of a non-follower' do
let!(:original_status) { Fabricate(:status, account: bill, text: 'Hello ThisIsASecret', visibility: :public) }
let!(:status) { ReblogService.new.call(alice, original_status) }
it 'sends Undo activity to followers' do
subject.call(status)
expect(a_request(:post, bill.shared_inbox_url).with(
body: hash_including({
'type' => 'Undo',
'object' => hash_including({
'type' => 'Announce',
'object' => ActivityPub::TagManager.instance.uri_for(original_status),
}),
})
)).to have_been_made.once
end
end
end