mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 00:26:30 +00:00
Use consistent terminology
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
6b9a347353
commit
39d3df86c8
3 changed files with 5 additions and 5 deletions
|
@ -2252,7 +2252,7 @@ defmodule Pleroma.User do
|
||||||
if String.contains?(user.nickname, "@") do
|
if String.contains?(user.nickname, "@") do
|
||||||
user.nickname
|
user.nickname
|
||||||
else
|
else
|
||||||
host = Pleroma.Web.WebFinger.domain()
|
host = Pleroma.Web.WebFinger.host()
|
||||||
user.nickname <> "@" <> host
|
user.nickname <> "@" <> host
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -14,7 +14,7 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do
|
||||||
instance = Config.get(:instance)
|
instance = Config.get(:instance)
|
||||||
|
|
||||||
%{
|
%{
|
||||||
uri: Pleroma.Web.WebFinger.domain(),
|
uri: Pleroma.Web.WebFinger.host(),
|
||||||
title: Keyword.get(instance, :name),
|
title: Keyword.get(instance, :name),
|
||||||
description: Keyword.get(instance, :description),
|
description: Keyword.get(instance, :description),
|
||||||
short_description: Keyword.get(instance, :short_description),
|
short_description: Keyword.get(instance, :short_description),
|
||||||
|
|
|
@ -70,7 +70,7 @@ defmodule Pleroma.Web.WebFinger do
|
||||||
|
|
||||||
def represent_user(user, "JSON") do
|
def represent_user(user, "JSON") do
|
||||||
%{
|
%{
|
||||||
"subject" => "acct:#{user.nickname}@#{domain()}",
|
"subject" => "acct:#{user.nickname}@#{host()}",
|
||||||
"aliases" => gather_aliases(user),
|
"aliases" => gather_aliases(user),
|
||||||
"links" => gather_links(user)
|
"links" => gather_links(user)
|
||||||
}
|
}
|
||||||
|
@ -90,13 +90,13 @@ defmodule Pleroma.Web.WebFinger do
|
||||||
:XRD,
|
:XRD,
|
||||||
%{xmlns: "http://docs.oasis-open.org/ns/xri/xrd-1.0"},
|
%{xmlns: "http://docs.oasis-open.org/ns/xri/xrd-1.0"},
|
||||||
[
|
[
|
||||||
{:Subject, "acct:#{user.nickname}@#{domain()}"}
|
{:Subject, "acct:#{user.nickname}@#{host()}"}
|
||||||
] ++ aliases ++ links
|
] ++ aliases ++ links
|
||||||
}
|
}
|
||||||
|> XmlBuilder.to_doc()
|
|> XmlBuilder.to_doc()
|
||||||
end
|
end
|
||||||
|
|
||||||
def domain do
|
def host do
|
||||||
Pleroma.Config.get([__MODULE__, :domain]) || Pleroma.Web.Endpoint.host()
|
Pleroma.Config.get([__MODULE__, :domain]) || Pleroma.Web.Endpoint.host()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue