SimplePolicy: filter nested objects
This commit is contained in:
parent
b221d77a6d
commit
3d742c3c1a
2 changed files with 22 additions and 1 deletions
|
|
@ -260,6 +260,18 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicyTest do
|
|||
|
||||
assert {:reject, _} = SimplePolicy.filter(remote_user)
|
||||
end
|
||||
|
||||
test "reject Announce when object would be rejected" do
|
||||
clear_config([:mrf_simple, :reject], ["blocked.tld"])
|
||||
|
||||
announce = %{
|
||||
"type" => "Announce",
|
||||
"actor" => "https://okay.tld/users/alice",
|
||||
"object" => %{"type" => "Note", "actor" => "https://blocked.tld/users/bob"}
|
||||
}
|
||||
|
||||
assert {:reject, _} = SimplePolicy.filter(announce)
|
||||
end
|
||||
end
|
||||
|
||||
describe "when :followers_only" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue