Remove @providers and call Pleroma.config on runtime
authorrinpatch <rinpatch@sdf.org>
Wed, 16 Jan 2019 15:04:41 +0000 (18:04 +0300)
committerrinpatch <rinpatch@sdf.org>
Wed, 16 Jan 2019 15:04:41 +0000 (18:04 +0300)
lib/pleroma/user.ex
lib/pleroma/web/metadata.ex

index f6c0f36e42ca5c2122874d4af48baf8d1a747bdf..180ef180c63839ca9fd16ac64926b75103c37f6c 100644 (file)
@@ -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
index 8793fc265ec76dcfe1a78eed1752c5602c1870a4..2164b0fe866d89ddbb99b4817e76b4f83aa0b243 100644 (file)
@@ -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()