update api to set skip_thread_containment
This commit is contained in:
parent
080e1aa70e
commit
f13d6c7f78
7 changed files with 60 additions and 5 deletions
|
|
@ -117,7 +117,15 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|
|||
|> Enum.dedup()
|
||||
|
||||
info_params =
|
||||
[:no_rich_text, :locked, :hide_followers, :hide_follows, :hide_favorites, :show_role]
|
||||
[
|
||||
:no_rich_text,
|
||||
:locked,
|
||||
:hide_followers,
|
||||
:hide_follows,
|
||||
:hide_favorites,
|
||||
:show_role,
|
||||
:skip_thread_containment
|
||||
]
|
||||
|> Enum.reduce(%{}, fn key, acc ->
|
||||
add_if_present(acc, params, to_string(key), key, fn value ->
|
||||
{:ok, ControllerHelper.truthy_param?(value)}
|
||||
|
|
|
|||
|
|
@ -124,7 +124,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
|
|||
hide_followers: user.info.hide_followers,
|
||||
hide_follows: user.info.hide_follows,
|
||||
hide_favorites: user.info.hide_favorites,
|
||||
relationship: relationship
|
||||
relationship: relationship,
|
||||
skip_thread_containment: user.info.skip_thread_containment
|
||||
}
|
||||
}
|
||||
|> maybe_put_role(user, opts[:for])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue