aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/activity_pub/utils.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/web/activity_pub/utils.ex')
-rw-r--r--lib/pleroma/web/activity_pub/utils.ex6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/pleroma/web/activity_pub/utils.ex b/lib/pleroma/web/activity_pub/utils.ex
index ac20a2822..cda106283 100644
--- a/lib/pleroma/web/activity_pub/utils.ex
+++ b/lib/pleroma/web/activity_pub/utils.ex
@@ -68,7 +68,7 @@ defmodule Pleroma.Web.ActivityPub.Utils do
@doc """
Inserts a full object if it is contained in an activity.
"""
- def insert_full_object(%{"object" => object_data}) when is_map(object_data) do
+ def insert_full_object(%{"object" => %{"type" => type} = object_data}) when is_map(object_data) and type in ["Note"] do
with {:ok, _} <- Object.create(object_data) do
:ok
end
@@ -109,6 +109,7 @@ defmodule Pleroma.Web.ActivityPub.Utils do
"actor" => ap_id,
"object" => id,
"to" => [actor.follower_address, object.data["actor"]],
+ "cc" => ["https://www.w3.org/ns/activitystreams#Public"],
"context" => object.data["context"]
}
@@ -150,6 +151,7 @@ defmodule Pleroma.Web.ActivityPub.Utils do
"type" => "Follow",
"actor" => follower_id,
"to" => [followed_id],
+ "cc" => ["https://www.w3.org/ns/activitystreams#Public"],
"object" => followed_id
}
@@ -177,6 +179,7 @@ defmodule Pleroma.Web.ActivityPub.Utils do
"actor" => ap_id,
"object" => id,
"to" => [user.follower_address, object.data["actor"]],
+ "cc" => ["https://www.w3.org/ns/activitystreams#Public"],
"context" => object.data["context"]
}
@@ -205,7 +208,6 @@ defmodule Pleroma.Web.ActivityPub.Utils do
def make_create_data(params, additional) do
published = params.published || make_date()
-
%{
"type" => "Create",
"to" => params.to |> Enum.uniq,