[#1505] Removed wrapping of reply URIs into first element, added comments to transmogrifier tests.

This commit is contained in:
Ivan Tashkinov 2020-02-09 17:34:48 +03:00
commit 24e49d14f2
3 changed files with 7 additions and 19 deletions

View file

@ -935,19 +935,9 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
end
defp set_replies(obj, replies_uris) do
# Note: stubs (Mastodon doesn't make separate requests via those URIs in FetchRepliesService)
masto_replies_uri = nil
masto_replies_next_page_uri = nil
replies_collection = %{
"type" => "Collection",
"id" => masto_replies_uri,
"first" => %{
"type" => "Collection",
"part_of" => masto_replies_uri,
"items" => replies_uris,
"next" => masto_replies_next_page_uri
}
"items" => replies_uris
}
Map.merge(obj, %{"replies" => replies_collection})