1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-11-18 02:49:18 +00:00

Merge branch 'bugfix/user-search-with-at-sign' into 'develop'

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

Closes #117

See merge request pleroma/pleroma!99
This commit is contained in:
lambda 2018-04-09 08:42:01 +00:00
commit d7c2909ce2

View file

@ -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