diff options
author | lain <lain@soykaf.club> | 2019-11-21 13:13:14 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2019-11-21 13:13:14 +0000 |
commit | 8feb5dcb4240e92bf20cdc6896877cfa9551b61c (patch) | |
tree | b5d06ca778b0ded2649ba57bc75ce43cb2e0f8db /lib/pleroma/web/mastodon_api/controllers | |
parent | 1680a3479e4e0b3be5af8db130f8672a063841b0 (diff) | |
parent | e52955c961a225618f00f8f0fc0e7dcbf5a51e23 (diff) | |
download | pleroma-8feb5dcb4240e92bf20cdc6896877cfa9551b61c.tar.gz |
Merge branch 'issue/1348' into 'develop'
[#1348] excluded invisible actors from gets /api/v1/accounts/:id
See merge request pleroma/pleroma!1937
Diffstat (limited to 'lib/pleroma/web/mastodon_api/controllers')
-rw-r--r-- | lib/pleroma/web/mastodon_api/controllers/account_controller.ex | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/mastodon_api/controllers/account_controller.ex b/lib/pleroma/web/mastodon_api/controllers/account_controller.ex index 5b01b964b..5f2544640 100644 --- a/lib/pleroma/web/mastodon_api/controllers/account_controller.ex +++ b/lib/pleroma/web/mastodon_api/controllers/account_controller.ex @@ -238,7 +238,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do @doc "GET /api/v1/accounts/:id" def show(%{assigns: %{user: for_user}} = conn, %{"id" => nickname_or_id}) do with %User{} = user <- User.get_cached_by_nickname_or_id(nickname_or_id, for: for_user), - true <- User.auth_active?(user) || user.id == for_user.id || User.superuser?(for_user) do + true <- User.visible_for?(user, for_user) do render(conn, "show.json", user: user, for: for_user) else _e -> render_error(conn, :not_found, "Can't find user") |