Expose correct relay address in federation

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-05-06 17:21:11 +02:00
parent 3982977121
commit 888d2ef4b8
6 changed files with 15 additions and 15 deletions

View File

@@ -1297,16 +1297,6 @@ defmodule Mobilizon.Actors do
:ok
end
@spec has_relay?(String.t()) :: boolean()
def has_relay?(domain) do
Actor
|> where(
[a],
a.preferred_username == "relay" and a.domain == ^domain and a.type == :Application
)
|> Repo.exists?()
end
@doc """
Returns a relay actor, either `relay@domain` (Mobilizon) or `domain@domain` (Mastodon)
"""