projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Unify object representation.
[akkoma]
/
lib
/
pleroma
/
web
/
activity_pub
/
views
/
object_view.ex
diff --git
a/lib/pleroma/web/activity_pub/views/object_view.ex
b/lib/pleroma/web/activity_pub/views/object_view.ex
index c39f994546b2a83fd95244f1fefb99252a52726f..cc0b0556bcf3571b9e54d426d970ac756bbd0bf3 100644
(file)
--- 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
defmodule Pleroma.Web.ActivityPub.ObjectView do
use Pleroma.Web, :view
+ alias Pleroma.Web.ActivityPub.Transmogrifier
def render("object.json", %{object: object}) do
base = %{
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
Map.merge(base, additional)
end
end