commit: 7b7b97eebcdaff6f856458b4f0f3c2362cb96483
parent 122f5af67c966227be9a219d8841db7bc2ef151a
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Wed, 28 Jul 2021 00:53:43 +0200
AP C2S: Set published date
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/pleroma/web/activity_pub/activity_pub_controller.ex b/lib/pleroma/web/activity_pub/activity_pub_controller.ex
@@ -418,6 +418,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do
|> Map.put("attributedTo", actor)
|> Map.put("actor", actor)
|> Map.put("id", Utils.generate_object_id())
+ |> Map.put("published", Utils.make_date())
{:ok, Map.put(activity, "object", object)}
else
@@ -460,6 +461,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do
|> Map.drop(["nickname"])
|> Map.put("id", Utils.generate_activity_id())
|> Map.put("actor", actor)
+ |> Map.put("published", Utils.make_date())
with {:ok, params} <- fix_user_message(user, params),
{:ok, activity, _} <- Pipeline.common_pipeline(params, local: true),