0
0
Fork 0

Filter incoming Announce activities by relation to local activity (#10041)

* Filter incoming Announce activities by relation to local activity

Reject if announcer is not followed by local accounts, and is not
from an enabled relay, and the object is not a local status

Follow-up to #10005

* Fix tests
This commit is contained in:
Eugen Rochko 2019-02-15 18:19:45 +01:00 committed by GitHub
parent 8ef50706a1
commit c417e8c198
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 13 deletions

View file

@ -18,6 +18,7 @@ RSpec.describe ActivityPub::Activity::Announce do
subject { described_class.new(json, sender) }
before do
Fabricate(:account).follow!(sender)
sender.update(uri: ActivityPub::TagManager.instance.uri_for(sender))
end