X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Factivity_pub%2Fviews%2Fobject_view.ex;h=cc0b0556bcf3571b9e54d426d970ac756bbd0bf3;hb=0f5bff8c66fa2b67633fe05de8aaa1985f4d98f8;hp=c39f994546b2a83fd95244f1fefb99252a52726f;hpb=94db9ac4dba6ba02fcae1b9055b532818cf787c7;p=akkoma diff --git a/lib/pleroma/web/activity_pub/views/object_view.ex b/lib/pleroma/web/activity_pub/views/object_view.ex index c39f99454..cc0b0556b 100644 --- a/lib/pleroma/web/activity_pub/views/object_view.ex +++ b/lib/pleroma/web/activity_pub/views/object_view.ex @@ -1,5 +1,6 @@ defmodule Pleroma.Web.ActivityPub.ObjectView do use Pleroma.Web, :view + alias Pleroma.Web.ActivityPub.Transmogrifier def render("object.json", %{object: object}) do base = %{ @@ -20,8 +21,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectView do ] } - additional = Map.take(object.data, ["id", "to", "cc", "actor", "content", "summary", "type"]) - |> Map.put("attributedTo", object.data["actor"]) + additional = Transmogrifier.prepare_object(object.data) Map.merge(base, additional) end end