projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
10ef532
)
search: Apply following filter only when user is usable
author
Haelwenn (lanodan) Monnier
<contact@hacktivis.me>
Wed, 2 Sep 2020 18:11:24 +0000
(20:11 +0200)
committer
rinpatch
<rinpatch@sdf.org>
Tue, 8 Sep 2020 17:21:34 +0000
(20:21 +0300)
lib/pleroma/user/search.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/user/search.ex
b/lib/pleroma/user/search.ex
index adbef7fb8c45abf7ca989d57f4f4c1bdf1593f6e..7babd47ea542db084a171d373c2b1bc84aaac836 100644
(file)
--- a/
lib/pleroma/user/search.ex
+++ b/
lib/pleroma/user/search.ex
@@
-115,8
+115,8
@@
defmodule Pleroma.User.Search do
)
end
- defp base_query(
_user, false), do: User
- defp base_query(
user, true), do: User.get_friends_query(user)
+ defp base_query(
%User{} = user, true), do: User.get_friends_query(user)
+ defp base_query(
_user, _following), do: User
defp filter_invisible_users(query) do
from(q in query, where: q.invisible == false)