diff --git a/lib/mobilizon/actors/actors.ex b/lib/mobilizon/actors/actors.ex index e55f1070..21dc47a8 100644 --- a/lib/mobilizon/actors/actors.ex +++ b/lib/mobilizon/actors/actors.ex @@ -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