diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-05-01 18:45:24 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-05-01 18:45:24 +0300 |
commit | d5cdc907e3fda14c2ce78ddbb124739441330ecc (patch) | |
tree | e6d214d87f18a7389f42049e5bae244e4d99aa77 /lib/pleroma/web/controller_helper.ex | |
parent | ed4e9e6435cdc4740cf12464f01ffdb5a6a96583 (diff) | |
download | pleroma-d5cdc907e3fda14c2ce78ddbb124739441330ecc.tar.gz |
Restricted embedding of relationships where applicable (statuses / notifications / accounts rendering).
Added support for :skip_notifications for accounts listing (index.json).
Adjusted tests.
Diffstat (limited to 'lib/pleroma/web/controller_helper.ex')
-rw-r--r-- | lib/pleroma/web/controller_helper.ex | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/pleroma/web/controller_helper.ex b/lib/pleroma/web/controller_helper.ex index eb97ae975..f0b4c087a 100644 --- a/lib/pleroma/web/controller_helper.ex +++ b/lib/pleroma/web/controller_helper.ex @@ -5,8 +5,6 @@ defmodule Pleroma.Web.ControllerHelper do use Pleroma.Web, :controller - alias Pleroma.Config - # As in Mastodon API, per https://api.rubyonrails.org/classes/ActiveModel/Type/Boolean.html @falsy_param_values [false, 0, "0", "f", "F", "false", "False", "FALSE", "off", "OFF"] @@ -106,13 +104,8 @@ defmodule Pleroma.Web.ControllerHelper do def put_if_exist(map, key, value), do: Map.put(map, key, value) - @doc "Whether to skip rendering `[:account][:pleroma][:relationship]`for statuses/notifications" + @doc "Whether to skip `account.pleroma.relationship` rendering for statuses/notifications" def skip_relationships?(params) do - if Config.get([:extensions, :output_relationships_in_statuses_by_default]) do - false - else - # BREAKING: older PleromaFE versions do not send this param but _do_ expect relationships. - not truthy_param?(params["with_relationships"]) - end + not truthy_param?(params["with_relationships"]) end end |