SimplePolicy: filter string Objects

This commit is contained in:
Alex Gleason 2021-04-29 11:51:49 -05:00
commit c16c7fdb87
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 26 additions and 1 deletions

View file

@ -272,6 +272,18 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicyTest do
assert {:reject, _} = SimplePolicy.filter(announce)
end
test "reject by URI object" do
clear_config([:mrf_simple, :reject], ["blocked.tld"])
announce = %{
"type" => "Announce",
"actor" => "https://okay.tld/users/alice",
"object" => "https://blocked.tld/activities/1"
}
assert {:reject, _} = SimplePolicy.filter(announce)
end
end
describe "when :followers_only" do