Do not include activities of invisible users unless explicitly requested

Closes #1833
This commit is contained in:
rinpatch 2020-06-01 22:18:20 +03:00
commit 165a4b2a69
5 changed files with 23 additions and 14 deletions

View file

@ -21,7 +21,7 @@ defmodule Pleroma.Web.AdminAPI.Search do
query =
params
|> Map.drop([:page, :page_size])
|> Map.put(:exclude_service_users, true)
|> Map.put(:invisible, false)
|> User.Query.build()
|> order_by([u], u.nickname)
@ -31,7 +31,6 @@ defmodule Pleroma.Web.AdminAPI.Search do
count = Repo.aggregate(query, :count, :id)
results = Repo.all(paginated_query)
{:ok, results, count}
end
end