diff options
author | lain <lain@soykaf.club> | 2018-02-17 20:47:45 +0100 |
---|---|---|
committer | lain <lain@soykaf.club> | 2018-02-17 20:47:45 +0100 |
commit | 0f2ad25a7b1125c1e945d474a1873773fdfee26a (patch) | |
tree | 93744710eef650e9f1764f9e3cabdd427ebf45f2 | |
parent | 32b995fbb6488e64d8caefe1d2ef270a83fbe3c2 (diff) | |
download | pleroma-0f2ad25a7b1125c1e945d474a1873773fdfee26a.tar.gz pleroma-0f2ad25a7b1125c1e945d474a1873773fdfee26a.zip |
AcitvityPub: Outgoing Announces.
-rw-r--r-- | lib/pleroma/web/activity_pub/transmogrifier.ex | 2 | ||||
-rw-r--r-- | lib/pleroma/web/activity_pub/views/object_view.ex | 1 |
2 files changed, 2 insertions, 1 deletions
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 |