From: lain Date: Sat, 17 Feb 2018 19:47:45 +0000 (+0100) Subject: AcitvityPub: Outgoing Announces. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=0f2ad25a7b1125c1e945d474a1873773fdfee26a;p=akkoma AcitvityPub: Outgoing Announces. --- diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex index b5a126cb6..c1d7cb3ae 100644 --- a/lib/pleroma/web/activity_pub/transmogrifier.ex +++ b/lib/pleroma/web/activity_pub/transmogrifier.ex @@ -96,7 +96,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do {:ok, data} end - def prepare_outgoing(%{"type" => type} = data) when type in ["Follow", "Accept", "Like"] do + def prepare_outgoing(%{"type" => type} = data) when type in ["Follow", "Accept", "Like", "Announce"] do data = data |> Map.put("@context", "https://www.w3.org/ns/activitystreams") diff --git a/lib/pleroma/web/activity_pub/views/object_view.ex b/lib/pleroma/web/activity_pub/views/object_view.ex index 403f8cb17..c39f99454 100644 --- a/lib/pleroma/web/activity_pub/views/object_view.ex +++ b/lib/pleroma/web/activity_pub/views/object_view.ex @@ -21,6 +21,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectView do } additional = Map.take(object.data, ["id", "to", "cc", "actor", "content", "summary", "type"]) + |> Map.put("attributedTo", object.data["actor"]) Map.merge(base, additional) end end