AcitvityPub: Outgoing Announces.

stable
lain 7 years ago
parent 32b995fbb6
commit 0f2ad25a7b

@ -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")

@ -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

Loading…
Cancel
Save