activitypub: transmogrifier: ensure we send nested object in Create
authorWilliam Pitcock <nenolod@dereferenced.org>
Sun, 25 Nov 2018 22:11:10 +0000 (22:11 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Tue, 4 Dec 2018 04:52:09 +0000 (04:52 +0000)
lib/pleroma/web/activity_pub/transmogrifier.ex

index 17b0636094d8503490a027e1a4c8d9dc92c1c334..5e3d40d9f9bd75176726126c8d346bb5352a83af 100644 (file)
@@ -616,9 +616,9 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
   #  internal -> Mastodon
   #  """
 
-  def prepare_outgoing(%{"type" => "Create", "object" => %{"type" => "Note"} = object} = data) do
+  def prepare_outgoing(%{"type" => "Create", "object" => object_id} = data) do
     object =
-      object
+      Object.normalize(object_id).data
       |> prepare_object
 
     data =