aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2018-02-17 20:47:45 +0100
committerlain <lain@soykaf.club>2018-02-17 20:47:45 +0100
commit0f2ad25a7b1125c1e945d474a1873773fdfee26a (patch)
tree93744710eef650e9f1764f9e3cabdd427ebf45f2
parent32b995fbb6488e64d8caefe1d2ef270a83fbe3c2 (diff)
downloadpleroma-0f2ad25a7b1125c1e945d474a1873773fdfee26a.tar.gz
AcitvityPub: Outgoing Announces.
-rw-r--r--lib/pleroma/web/activity_pub/transmogrifier.ex2
-rw-r--r--lib/pleroma/web/activity_pub/views/object_view.ex1
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