projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request 'Delete 'installation/download-mastofe-build.sh'' (#317) from...
[akkoma]
/
lib
/
pleroma
/
user
/
search.ex
diff --git
a/lib/pleroma/user/search.ex
b/lib/pleroma/user/search.ex
index f1761ef032d1fe26455e24ebad287aa5bf66a5f9..6b3f589993afee4b97d8d45ecdb730af4cafc7ce 100644
(file)
--- a/
lib/pleroma/user/search.ex
+++ b/
lib/pleroma/user/search.ex
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-202
0
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-202
1
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.User.Search do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.User.Search do
@@
-94,6
+94,7
@@
defmodule Pleroma.User.Search do
|> subquery()
|> order_by(desc: :search_rank)
|> maybe_restrict_local(for_user)
|> subquery()
|> order_by(desc: :search_rank)
|> maybe_restrict_local(for_user)
+ |> filter_deactivated_users()
end
defp select_top_users(query, top_user_ids) do
end
defp select_top_users(query, top_user_ids) do
@@
-166,6
+167,10
@@
defmodule Pleroma.User.Search do
from(q in query, where: q.actor_type != "Application")
end
from(q in query, where: q.actor_type != "Application")
end
+ defp filter_deactivated_users(query) do
+ from(q in query, where: q.is_active == true)
+ end
+
defp filter_blocked_user(query, %User{} = blocker) do
query
|> join(:left, [u], b in Pleroma.UserRelationship,
defp filter_blocked_user(query, %User{} = blocker) do
query
|> join(:left, [u], b in Pleroma.UserRelationship,