aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2020-06-15 02:20:18 +0200
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2020-07-15 11:39:55 +0200
commit47ba796f415740c443cd8477c121280656b13032 (patch)
tree626dc780f33c1fa48fd97c2549a4589bfea59d4a
parentad867ccfa18afe2a6104cad4d3035834c5a264c8 (diff)
downloadpleroma-47ba796f415740c443cd8477c121280656b13032.tar.gz
create_question_validator: remove validate_recipients_match
-rw-r--r--lib/pleroma/web/activity_pub/object_validators/create_question_validator.ex17
1 files changed, 0 insertions, 17 deletions
diff --git a/lib/pleroma/web/activity_pub/object_validators/create_question_validator.ex b/lib/pleroma/web/activity_pub/object_validators/create_question_validator.ex
index f09207418..6d3f71566 100644
--- a/lib/pleroma/web/activity_pub/object_validators/create_question_validator.ex
+++ b/lib/pleroma/web/activity_pub/object_validators/create_question_validator.ex
@@ -47,7 +47,6 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.CreateQuestionValidator do
|> validate_inclusion(:type, ["Create"])
|> validate_actor_presence()
|> validate_any_presence([:to, :cc])
- |> validate_recipients_match(meta)
|> validate_actors_match(meta)
|> validate_object_nonexistence()
end
@@ -75,20 +74,4 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.CreateQuestionValidator do
end
end)
end
-
- def validate_recipients_match(cng, meta) do
- object_recipients = meta[:object_data]["to"] || []
-
- cng
- |> validate_change(:to, fn :to, recipients ->
- activity_set = MapSet.new(recipients)
- object_set = MapSet.new(object_recipients)
-
- if MapSet.equal?(activity_set, object_set) do
- []
- else
- [{:to, "Recipients don't match with object recipients"}]
- end
- end)
- end
end