Move putting fake attribute to lib/pleroma/web/activity_pub/utils.ex
authorrinpatch <rinpatch@sdf.org>
Mon, 1 Apr 2019 09:25:53 +0000 (12:25 +0300)
committerrinpatch <rinpatch@sdf.org>
Mon, 1 Apr 2019 09:25:53 +0000 (12:25 +0300)
lib/pleroma/web/activity_pub/activity_pub.ex
lib/pleroma/web/activity_pub/utils.ex

index 9cb4a0542ca35343fd54a03cdc977bca4c6b64fe..f217e7bac35c9271f633c3765ddb9477769d1e31 100644 (file)
@@ -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,
index feb73518eba118b444ed710417f4e5e0b4fe906f..d22da6f404ad972dcebc199861cb44a36a2b4504 100644 (file)
@@ -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