mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-23 23:11:13 +00:00
Move putting fake attribute to lib/pleroma/web/activity_pub/utils.ex
This commit is contained in:
parent
975482f091
commit
fe5145eeaa
|
@ -150,10 +150,6 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
||||||
{:ok, activity}
|
{:ok, activity}
|
||||||
|
|
||||||
{:fake, true, map, recipients} ->
|
{:fake, true, map, recipients} ->
|
||||||
map =
|
|
||||||
map
|
|
||||||
|> put_in(["object", "fake"], true)
|
|
||||||
|
|
||||||
activity = %Activity{
|
activity = %Activity{
|
||||||
data: map,
|
data: map,
|
||||||
local: local,
|
local: local,
|
||||||
|
|
|
@ -209,8 +209,9 @@ defmodule Pleroma.Web.ActivityPub.Utils do
|
||||||
def lazy_put_object_defaults(map, activity, true = _fake) do
|
def lazy_put_object_defaults(map, activity, true = _fake) do
|
||||||
map
|
map
|
||||||
|> Map.put_new_lazy("published", &make_date/0)
|
|> 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("context", activity["context"])
|
||||||
|
|> Map.put_new("fake", true)
|
||||||
|> Map.put_new("context_id", activity["context_id"])
|
|> Map.put_new("context_id", activity["context_id"])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue