Merge branch '2201-i-hate-this' into 'develop'
User search: Once again, change uri handling. Closes #2201 See merge request pleroma/pleroma!3048
This commit is contained in:
commit
2566467782
4 changed files with 18 additions and 3 deletions
|
|
@ -54,8 +54,9 @@ defmodule Pleroma.User.Search do
|
|||
|
||||
defp maybe_add_uri_match(list, query) do
|
||||
with {:ok, query} <- UriType.cast(query),
|
||||
%User{} = user <- Pleroma.Repo.get_by(User, uri: query) do
|
||||
[user.id | list]
|
||||
q = from(u in User, where: u.uri == ^query, select: u.id),
|
||||
users = Pleroma.Repo.all(q) do
|
||||
users ++ list
|
||||
else
|
||||
_ -> list
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue