aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-05-05 10:12:37 +0200
committerlain <lain@soykaf.club>2020-05-05 10:12:37 +0200
commit6400998820084c7b81a53bbeb705b0eb2c0a0e1b (patch)
treeb25f3c8b1e9b933a30ce22d8a0f0050b3643bf05 /lib
parentb1c29e2de8a02ef3093387c1454d290a92fbdef8 (diff)
downloadpleroma-6400998820084c7b81a53bbeb705b0eb2c0a0e1b.tar.gz
AP C2S: Restrict creation to `Note`s for now.
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 f607931ab..504eed4f4 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"]))