commit: c8d188ba094afbfcf657c01f6f5bffabd1942cb5
parent 66aeb18764b9546350b22692690a9b5e17d59317
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
@@ -426,6 +426,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
@@ -468,6 +469,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),