mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-25 09:22:22 +00:00
Fix finding local actor by username with domain
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
479bd466b5
commit
6f5d535b86
1 changed files with 6 additions and 0 deletions
|
@ -1616,6 +1616,12 @@ defmodule Mobilizon.Actors do
|
||||||
from(a in query, where: a.preferred_username == ^name and is_nil(a.domain))
|
from(a in query, where: a.preferred_username == ^name and is_nil(a.domain))
|
||||||
end
|
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
|
defp filter_by_name(query, [name, domain]) do
|
||||||
from(a in query, where: a.preferred_username == ^name and a.domain == ^domain)
|
from(a in query, where: a.preferred_username == ^name and a.domain == ^domain)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue