From: Haelwenn (lanodan) Monnier Date: Thu, 12 Jul 2018 21:25:44 +0000 (+0200) Subject: [Pleroma.Web.ActivityPub.Transmogrifier] Add Person finding X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=7501481db4be56cf7b5babeeebeb7b96273ae4db;p=akkoma [Pleroma.Web.ActivityPub.Transmogrifier] Add Person finding --- diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex index 6080303b6..2ebc526df 100644 --- a/lib/pleroma/web/activity_pub/transmogrifier.ex +++ b/lib/pleroma/web/activity_pub/transmogrifier.ex @@ -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. """