From: rinpatch Date: Mon, 1 Apr 2019 09:25:53 +0000 (+0300) Subject: Move putting fake attribute to lib/pleroma/web/activity_pub/utils.ex X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=fe5145eeaab81573614a3475463a24229a6a58a3;p=akkoma Move putting fake attribute to lib/pleroma/web/activity_pub/utils.ex --- diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index 9cb4a0542..f217e7bac 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -150,10 +150,6 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do {:ok, activity} {:fake, true, map, recipients} -> - map = - map - |> put_in(["object", "fake"], true) - activity = %Activity{ data: map, local: local, diff --git a/lib/pleroma/web/activity_pub/utils.ex b/lib/pleroma/web/activity_pub/utils.ex index feb73518e..d22da6f40 100644 --- a/lib/pleroma/web/activity_pub/utils.ex +++ b/lib/pleroma/web/activity_pub/utils.ex @@ -209,8 +209,9 @@ defmodule Pleroma.Web.ActivityPub.Utils do def lazy_put_object_defaults(map, activity, true = _fake) do map |> Map.put_new_lazy("published", &make_date/0) - |> Map.put_new("id", "pleroma:fakeid") + |> Map.put_new("id", "pleroma:fake_object_id") |> Map.put_new("context", activity["context"]) + |> Map.put_new("fake", true) |> Map.put_new("context_id", activity["context_id"]) end