mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-20 04:04:44 +00:00
user: strip leading @ from user query when searching for users if present
closes #117
This commit is contained in:
parent
8f9bcc4ab0
commit
2edde06042
1 changed files with 3 additions and 0 deletions
|
@ -375,6 +375,9 @@ defmodule Pleroma.User do
|
||||||
end
|
end
|
||||||
|
|
||||||
def search(query, resolve) do
|
def search(query, resolve) do
|
||||||
|
# strip the beginning @ off if there is a query
|
||||||
|
query = String.trim_leading(query, "@")
|
||||||
|
|
||||||
if resolve do
|
if resolve do
|
||||||
User.get_or_fetch_by_nickname(query)
|
User.get_or_fetch_by_nickname(query)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue