activitypub: object view: include child object for Listen activities

This commit is contained in:
Ariadne Conill 2019-09-28 12:28:39 +00:00
parent 71eff09e56
commit 84712c35f9
1 changed files with 2 additions and 1 deletions

View File

@ -15,7 +15,8 @@ def render("object.json", %{object: %Object{} = object}) do
Map.merge(base, additional)
end
def render("object.json", %{object: %Activity{data: %{"type" => "Create"}} = activity}) do
def render("object.json", %{object: %Activity{data: %{"type" => activity_type}} = activity})
when activity_type in ["Create", "Listen"] do
base = Pleroma.Web.ActivityPub.Utils.make_json_ld_header()
object = Object.normalize(activity)