aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-05-07 22:29:16 +0000
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-05-07 22:29:16 +0000
commit769d95644daf07bf27fb483e91d0e793eaa18bd8 (patch)
tree376943bb2df485e7c37cb26bce4b443e1f5808cd /lib
parentbef08b85e5e1e25b65851938d6152bf0c170af03 (diff)
parent6400998820084c7b81a53bbeb705b0eb2c0a0e1b (diff)
downloadpleroma-769d95644daf07bf27fb483e91d0e793eaa18bd8.tar.gz
Merge branch 'feature/restrict-c2s' into 'develop'
AP C2S: Restrict creation to `Note`s for now. See merge request pleroma/pleroma!2472
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/activity_pub/activity_pub_controller.ex5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub_controller.ex b/lib/pleroma/web/activity_pub/activity_pub_controller.ex
index 976ff243e..62ad15d85 100644
--- a/lib/pleroma/web/activity_pub/activity_pub_controller.ex
+++ b/lib/pleroma/web/activity_pub/activity_pub_controller.ex
@@ -396,7 +396,10 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do
|> json(err)
end
- defp handle_user_activity(%User{} = user, %{"type" => "Create"} = params) do
+ defp handle_user_activity(
+ %User{} = user,
+ %{"type" => "Create", "object" => %{"type" => "Note"}} = params
+ ) do
object =
params["object"]
|> Map.merge(Map.take(params, ["to", "cc"]))