[Pleroma.Web.ActivityPub.Transmogrifier] Add Person finding

This commit is contained in:
Haelwenn (lanodan) Monnier 2018-07-12 23:25:44 +02:00
parent 8472fba2a7
commit 7501481db4
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE

View file

@ -21,6 +21,11 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
Enum.at(actor, 0)
end
def get_actor(%{"actor" => actor_list}) do
Enum.find(actor_list, fn %{"type" => type} -> type == "Person" end)
|> Map.get("id")
end
@doc """
Modifies an incoming AP object (mastodon format) to our internal format.
"""