User: Don't unfollow on block when the relevant setting is set.
This commit is contained in:
parent
c3383d4fab
commit
15a8b70318
4 changed files with 18 additions and 20 deletions
|
|
@ -680,11 +680,5 @@ 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
|
||||
|
|
|
|||
|
|
@ -87,6 +87,22 @@ defmodule Pleroma.Web.ActivityPub.SideEffectsTest do
|
|||
refute User.following?(blocked, user)
|
||||
assert User.blocks?(user, blocked)
|
||||
end
|
||||
|
||||
test "it blocks but does not unfollow if the relevant setting is set", %{
|
||||
user: user,
|
||||
blocked: blocked,
|
||||
block: block
|
||||
} do
|
||||
clear_config([:activitypub, :unfollow_blocked], false)
|
||||
assert User.following?(user, blocked)
|
||||
assert User.following?(blocked, user)
|
||||
|
||||
{:ok, _, _} = SideEffects.handle(block)
|
||||
|
||||
refute User.following?(user, blocked)
|
||||
assert User.following?(blocked, user)
|
||||
assert User.blocks?(user, blocked)
|
||||
end
|
||||
end
|
||||
|
||||
describe "update users" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue