projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56862f4
)
user: search: use get_or_fetch() instead of get_or_fetch_by_nickname()
author
William Pitcock
<nenolod@dereferenced.org>
Thu, 14 Feb 2019 19:58:24 +0000
(19:58 +0000)
committer
William Pitcock
<nenolod@dereferenced.org>
Thu, 14 Feb 2019 20:00:04 +0000
(20:00 +0000)
get_or_fetch() handles the nickname verses URI differences transparently.
lib/pleroma/user.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/user.ex
b/lib/pleroma/user.ex
index 3232cb8421e50f7596c778b1482f0b92c70f2f36..29d2b3d896d20a64e78907df1e847889bbd17651 100644
(file)
--- a/
lib/pleroma/user.ex
+++ b/
lib/pleroma/user.ex
@@
-731,7
+731,7
@@
defmodule Pleroma.User do
# Strip the beginning @ off if there is a query
query = String.trim_leading(query, "@")
- if resolve, do:
User.get_or_fetch_by_nickname
(query)
+ if resolve, do:
get_or_fetch
(query)
fts_results = do_search(fts_search_subquery(query), for_user)