AcitvityPub: Outgoing Announces.
authorlain <lain@soykaf.club>
Sat, 17 Feb 2018 19:47:45 +0000 (20:47 +0100)
committerlain <lain@soykaf.club>
Sat, 17 Feb 2018 19:47:45 +0000 (20:47 +0100)
lib/pleroma/web/activity_pub/transmogrifier.ex
lib/pleroma/web/activity_pub/views/object_view.ex

index b5a126cb6ff2234196e029c9ae8d85904d76f56c..c1d7cb3aee95afe6cfc0c6ce4910078dc497995a 100644 (file)
@@ -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")
 
index 403f8cb17236adea0b45090610a57e5986096398..c39f994546b2a83fd95244f1fefb99252a52726f 100644 (file)
@@ -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