[#2456] Added support for embed_relationships param, nailed down endpoints which should support it. Fixed :source_mutes relationships subset fetching.

This commit is contained in:
Ivan Tashkinov 2020-05-12 19:14:35 +03:00
commit 63a1a82f38
7 changed files with 99 additions and 13 deletions

View file

@ -103,4 +103,9 @@ defmodule Pleroma.Web.ControllerHelper do
def put_if_exist(map, _key, nil), do: map
def put_if_exist(map, key, value), do: Map.put(map, key, value)
def embed_relationships?(params) do
# To do: change to `truthy_param?(params["embed_relationships"])` once PleromaFE supports it
not explicitly_falsy_param?(params["embed_relationships"])
end
end