Make sure arg for Actors.get_actor_by_name/2 doesn't start with @
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
bbfe3de471
commit
4079af6f72
@ -156,7 +156,7 @@ defmodule Mobilizon.Actors do
|
||||
|
||||
query
|
||||
|> filter_by_type(type)
|
||||
|> filter_by_name(String.split(name, "@"))
|
||||
|> filter_by_name(name |> String.trim() |> String.trim_leading("@") |> String.split("@"))
|
||||
|> Repo.one()
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user