X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=inline;f=lib%2Fpleroma%2Fweb%2Factivity_pub%2Fobject_validators%2Fblock_validator.ex;h=c5f77bb76edb8c8cb485e59fdc08d8e00e81b803;hb=537ba1c5e07a33692ed63ca50b50e240efce6f88;hp=1989585b7b92dbaae2fce0d760129a18b9c9b94c;hpb=c3383d4fab6181d9f605a6058805333611534398;p=akkoma
diff --git a/lib/pleroma/web/activity_pub/object_validators/block_validator.ex b/lib/pleroma/web/activity_pub/object_validators/block_validator.ex
index 1989585b7..c5f77bb76 100644
--- a/lib/pleroma/web/activity_pub/object_validators/block_validator.ex
+++ b/lib/pleroma/web/activity_pub/object_validators/block_validator.ex
@@ -1,12 +1,11 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ActivityPub.ObjectValidators.BlockValidator do
use Ecto.Schema
alias Pleroma.EctoType.ActivityPub.ObjectValidators
- alias Pleroma.User
import Ecto.Changeset
import Pleroma.Web.ActivityPub.ObjectValidators.CommonValidations
@@ -33,7 +32,6 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.BlockValidator do
|> validate_inclusion(:type, ["Block"])
|> validate_actor_presence()
|> validate_actor_presence(field_name: :object)
- |> validate_block_acceptance()
end
def cast_and_validate(data) do
@@ -41,15 +39,4 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.BlockValidator do
|> cast_data
|> validate_data
end
-
- def validate_block_acceptance(cng) do
- actor = get_field(cng, :actor) |> User.get_cached_by_ap_id()
-
- if actor.local || Pleroma.Config.get([:activitypub, :unfollow_blocked], true) do
- cng
- else
- cng
- |> add_error(:actor, "Not accepting remote blocks")
- end
- end
end