aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/mastodon_api/controllers
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2020-07-22 19:06:00 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2020-07-22 19:06:00 +0300
commit6f5f7af607518b6f67df68bab9bf76142e9a622c (patch)
tree42b8040061d9401865c28e6de4f8bb454bf0ba79 /lib/pleroma/web/mastodon_api/controllers
parent1c9752cff445ab1f58cea1617d3c7ab73da60e10 (diff)
downloadpleroma-6f5f7af607518b6f67df68bab9bf76142e9a622c.tar.gz
[#1973] Fixed accounts rendering in GET /api/v1/pleroma/chats with truish :restrict_unauthenticated.
Made `Pleroma.Web.MastodonAPI.AccountView.render("show.json", _)` demand :for or :force option in order to prevent incorrect rendering of empty map instead of expected user representation with truish :restrict_unauthenticated setting.
Diffstat (limited to 'lib/pleroma/web/mastodon_api/controllers')
-rw-r--r--lib/pleroma/web/mastodon_api/controllers/search_controller.ex1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/pleroma/web/mastodon_api/controllers/search_controller.ex b/lib/pleroma/web/mastodon_api/controllers/search_controller.ex
index 29affa7d5..5a983db39 100644
--- a/lib/pleroma/web/mastodon_api/controllers/search_controller.ex
+++ b/lib/pleroma/web/mastodon_api/controllers/search_controller.ex
@@ -93,7 +93,6 @@ defmodule Pleroma.Web.MastodonAPI.SearchController do
AccountView.render("index.json",
users: accounts,
for: options[:for_user],
- as: :user,
embed_relationships: options[:embed_relationships]
)
end