activitypub: object view: include child object for Listen activities
authorAriadne Conill <ariadne@dereferenced.org>
Sat, 28 Sep 2019 12:28:39 +0000 (12:28 +0000)
committerAriadne Conill <ariadne@dereferenced.org>
Mon, 30 Sep 2019 10:39:48 +0000 (10:39 +0000)
lib/pleroma/web/activity_pub/views/object_view.ex

index 0d63f0707c2aa15ca7fc6f06bca957640a8b977c..88c55acddf62c82e8dd98242d27ca4cfa692b0ee 100644 (file)
@@ -15,7 +15,8 @@ defmodule Pleroma.Web.ActivityPub.ObjectView 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)