From 54fdf3a5de3ed2bbfe0792b5193774db8797044c Mon Sep 17 00:00:00 2001 From: Walter Huf Date: Sun, 22 Jan 2023 09:32:58 -0800 Subject: [PATCH] Use any custom WebFinger domain for page metadata --- lib/pleroma/web/metadata/utils.ex | 2 +- lib/pleroma/web/web_finger.ex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pleroma/web/metadata/utils.ex b/lib/pleroma/web/metadata/utils.ex index 7308726f5..92622ef15 100644 --- a/lib/pleroma/web/metadata/utils.ex +++ b/lib/pleroma/web/metadata/utils.ex @@ -55,7 +55,7 @@ defmodule Pleroma.Web.Metadata.Utils do def user_name_string(user) do "#{user.name} " <> if user.local do - "(@#{user.nickname}@#{Pleroma.Web.Endpoint.host()})" + "(@#{user.nickname}@#{Pleroma.Web.WebFinger.domain()})" else "(@#{user.nickname})" end diff --git a/lib/pleroma/web/web_finger.ex b/lib/pleroma/web/web_finger.ex index 364d0e0e6..ae3993f90 100644 --- a/lib/pleroma/web/web_finger.ex +++ b/lib/pleroma/web/web_finger.ex @@ -96,7 +96,7 @@ defmodule Pleroma.Web.WebFinger do |> XmlBuilder.to_doc() end - defp domain do + def domain do Pleroma.Config.get([__MODULE__, :domain]) || Pleroma.Web.Endpoint.host() end