X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Ffallback%2Fredirect_controller.ex;h=49f659cf0138035d1b8da31d9296ff8889c3cecc;hb=e2320f870e6ef4e8fc9f63282cbd459e819d740a;hp=a7b36a34b7b1253cf404c42483d2377a8be94abe;hpb=0374df1d12a4c28fac72be9b9c0545d318c10385;p=akkoma diff --git a/lib/pleroma/web/fallback/redirect_controller.ex b/lib/pleroma/web/fallback/redirect_controller.ex index a7b36a34b..49f659cf0 100644 --- a/lib/pleroma/web/fallback/redirect_controller.ex +++ b/lib/pleroma/web/fallback/redirect_controller.ex @@ -1,5 +1,5 @@ # Pleroma: A lightweight social networking server -# Copyright © 2017-2020 Pleroma Authors +# Copyright © 2017-2021 Pleroma Authors # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Web.Fallback.RedirectController do @@ -37,10 +37,11 @@ defmodule Pleroma.Web.Fallback.RedirectController do tags = build_tags(conn, params) preloads = preload_data(conn, params) + title = "#{Pleroma.Config.get([:instance, :name])}" response = index_content - |> String.replace("", tags <> preloads) + |> String.replace("", tags <> preloads <> title) conn |> put_resp_content_type("text/html") @@ -54,10 +55,12 @@ defmodule Pleroma.Web.Fallback.RedirectController do def redirector_with_preload(conn, params) do {:ok, index_content} = File.read(index_file_path()) preloads = preload_data(conn, params) + tags = Metadata.build_static_tags(params) + title = "#{Pleroma.Config.get([:instance, :name])}" response = index_content - |> String.replace("", preloads) + |> String.replace("", tags <> preloads <> title) conn |> put_resp_content_type("text/html") @@ -75,7 +78,7 @@ defmodule Pleroma.Web.Fallback.RedirectController do end defp index_file_path do - Pleroma.Plugs.InstanceStatic.file_path("index.html") + Pleroma.Web.Plugs.InstanceStatic.file_path("index.html") end defp build_tags(conn, params) do