Commit 2edde060 authored by kaniini's avatar kaniini
Browse files

user: strip leading @ from user query when searching for users if present

closes #117
parent 8f9bcc4a
...@@ -375,6 +375,9 @@ def get_recipients_from_activity(%Activity{recipients: to}) do ...@@ -375,6 +375,9 @@ def get_recipients_from_activity(%Activity{recipients: to}) 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment