0
0
Fork 0

Set snowflake IDs for backdated statuses (#5260)

- Rename Mastodon::TimestampIds into Mastodon::Snowflake for clarity
- Skip for statuses coming from inbox, aka delivered in real-time
- Skip for statuses that claim to be from the future
This commit is contained in:
Eugen Rochko 2017-10-08 17:34:34 +02:00 committed by GitHub
parent 6e4046fc3f
commit 0717d9b3e6
16 changed files with 83 additions and 43 deletions

View file

@ -28,7 +28,7 @@ RSpec.describe ActivityPub::ProcessCollectionService do
it 'processes payload with sender if no signature exists' do
expect_any_instance_of(ActivityPub::LinkedDataSignature).not_to receive(:verify_account!)
expect(ActivityPub::Activity).to receive(:factory).with(instance_of(Hash), forwarder)
expect(ActivityPub::Activity).to receive(:factory).with(instance_of(Hash), forwarder, instance_of(Hash))
subject.call(json, forwarder)
end
@ -37,7 +37,7 @@ RSpec.describe ActivityPub::ProcessCollectionService do
payload['signature'] = {'type' => 'RsaSignature2017'}
expect_any_instance_of(ActivityPub::LinkedDataSignature).to receive(:verify_account!).and_return(actor)
expect(ActivityPub::Activity).to receive(:factory).with(instance_of(Hash), actor)
expect(ActivityPub::Activity).to receive(:factory).with(instance_of(Hash), actor, instance_of(Hash))
subject.call(json, forwarder)
end