BlockValidator: Restore old behavior for incoming blocks.
This commit is contained in:
parent
84f9ca1956
commit
c3383d4fab
3 changed files with 20 additions and 2 deletions
|
|
@ -657,7 +657,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidatorTest do
|
|||
|
||||
describe "blocks" do
|
||||
setup do
|
||||
user = insert(:user)
|
||||
user = insert(:user, local: false)
|
||||
blocked = insert(:user)
|
||||
|
||||
{:ok, valid_block, []} = Builder.block(user, blocked)
|
||||
|
|
@ -680,5 +680,11 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidatorTest do
|
|||
|
||||
assert {:error, _cng} = ObjectValidator.validate(block, [])
|
||||
end
|
||||
|
||||
test "returns an error if don't accept remote blocks", %{valid_block: valid_block} do
|
||||
clear_config([:activitypub, :unfollow_blocked], false)
|
||||
|
||||
assert {:error, _cng} = ObjectValidator.validate(valid_block, [])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue