From 5fa508cc2be6a8e5b4d6522687708c6c269803a3 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Wed, 16 Jan 2019 18:04:41 +0300 Subject: [PATCH] Remove @providers and call Pleroma.config on runtime --- lib/pleroma/user.ex | 2 +- lib/pleroma/web/metadata.ex | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index f6c0f36e4..180ef180c 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -462,7 +462,7 @@ defmodule Pleroma.User do end def get_cached_by_nickname_or_id(nickname_or_id) do - get_cached_by_id(nickname_or_id) || get_cached_by_nickname(nickname_or_id) + get_cached_by_id(nickname_or_id) || get_cached_by_nickname(nickname_or_id) end def get_by_nickname(nickname) do diff --git a/lib/pleroma/web/metadata.ex b/lib/pleroma/web/metadata.ex index 8793fc265..2164b0fe8 100644 --- a/lib/pleroma/web/metadata.ex +++ b/lib/pleroma/web/metadata.ex @@ -4,10 +4,8 @@ defmodule Pleroma.Web.Metadata do alias Phoenix.HTML - @providers Pleroma.Config.get([__MODULE__, :providers], []) - def build_tags(params) do - Enum.reduce(@providers, "", fn parser, acc -> + Enum.reduce(Pleroma.Config.get([__MODULE__, :providers], []), "", fn parser, acc -> rendered_html = params |> parser.build_tags() -- 2.45.2