Use atomUri in Undo activity of Announce (#5376)
This allows deletion of reblogs which delivered before with OStatus URI.
This commit is contained in:
parent
ae716a12e1
commit
8125fdc19f
3 changed files with 26 additions and 6 deletions
|
@ -25,16 +25,30 @@ RSpec.describe ActivityPub::Activity::Undo do
|
|||
type: 'Announce',
|
||||
actor: ActivityPub::TagManager.instance.uri_for(sender),
|
||||
object: ActivityPub::TagManager.instance.uri_for(status),
|
||||
atomUri: 'barbar',
|
||||
}
|
||||
end
|
||||
|
||||
before do
|
||||
Fabricate(:status, reblog: status, account: sender, uri: 'bar')
|
||||
context do
|
||||
before do
|
||||
Fabricate(:status, reblog: status, account: sender, uri: 'bar')
|
||||
end
|
||||
|
||||
it 'deletes the reblog' do
|
||||
subject.perform
|
||||
expect(sender.reblogged?(status)).to be false
|
||||
end
|
||||
end
|
||||
|
||||
it 'deletes the reblog' do
|
||||
subject.perform
|
||||
expect(sender.reblogged?(status)).to be false
|
||||
context 'with atomUri' do
|
||||
before do
|
||||
Fabricate(:status, reblog: status, account: sender, uri: 'barbar')
|
||||
end
|
||||
|
||||
it 'deletes the reblog by atomUri' do
|
||||
subject.perform
|
||||
expect(sender.reblogged?(status)).to be false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue