Prepare all types objects before serialising

Activities returned from inbox can include other types of objects like
Article
This commit is contained in:
sxsdv1 2019-01-12 17:52:30 +01:00
commit 1eb7318831
3 changed files with 41 additions and 1 deletions

View file

@ -641,7 +641,7 @@ 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} = data) do
object =
object
|> prepare_object