Fix finding local actor by username with domain
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
48d7606e7e
commit
03f2664b01
@ -1616,6 +1616,12 @@ defmodule Mobilizon.Actors do
|
||||
from(a in query, where: a.preferred_username == ^name and is_nil(a.domain))
|
||||
end
|
||||
|
||||
@own_domain Mobilizon.Config.instance_hostname()
|
||||
|
||||
defp filter_by_name(query, [name, @own_domain]) do
|
||||
filter_by_name(query, [name])
|
||||
end
|
||||
|
||||
defp filter_by_name(query, [name, domain]) do
|
||||
from(a in query, where: a.preferred_username == ^name and a.domain == ^domain)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user