search: Apply following filter only when user is usable
This commit is contained in:
parent
10ef532c63
commit
16c451f8f1
@ -115,8 +115,8 @@ defp trigram_rank(query, query_string) 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)
|
||||
|
Loading…
Reference in New Issue
Block a user