data =
data
|> Map.put("object", object)
- |> Map.put("@context", "https://www.w3.org/ns/activitystreams")
+ |> Map.merge(Utils.make_json_ld_header())
{:ok, data}
end
data =
data
|> Map.put("object", object)
- |> Map.put("@context", "https://www.w3.org/ns/activitystreams")
+ |> Map.merge(Utils.make_json_ld_header())
{:ok, data}
end
data =
data
|> Map.put("object", object)
- |> Map.put("@context", "https://www.w3.org/ns/activitystreams")
+ |> Map.merge(Utils.make_json_ld_header())
{:ok, data}
end
data =
data
|> maybe_fix_object_url
- |> Map.put("@context", "https://www.w3.org/ns/activitystreams")
+ |> Map.merge(Utils.make_json_ld_header())
{:ok, data}
end
{:ok, activity} = CommonAPI.post(user, %{"status" => "hey"})
{:ok, modified} = Transmogrifier.prepare_outgoing(activity.data)
- assert modified["@context"] == "https://www.w3.org/ns/activitystreams"
+ assert modified["@context"] ==
+ Pleroma.Web.ActivityPub.Utils.make_json_ld_header()["@context"]
+
assert modified["object"]["conversation"] == modified["context"]
end