Remove @providers and call Pleroma.config on runtime
This commit is contained in:
parent
bb43f4cee9
commit
5fa508cc2b
@ -462,7 +462,7 @@ defmodule Pleroma.User do
|
|||||||
end
|
end
|
||||||
|
|
||||||
def get_cached_by_nickname_or_id(nickname_or_id) do
|
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
|
end
|
||||||
|
|
||||||
def get_by_nickname(nickname) do
|
def get_by_nickname(nickname) do
|
||||||
|
@ -4,10 +4,8 @@
|
|||||||
defmodule Pleroma.Web.Metadata do
|
defmodule Pleroma.Web.Metadata do
|
||||||
alias Phoenix.HTML
|
alias Phoenix.HTML
|
||||||
|
|
||||||
@providers Pleroma.Config.get([__MODULE__, :providers], [])
|
|
||||||
|
|
||||||
def build_tags(params) do
|
def build_tags(params) do
|
||||||
Enum.reduce(@providers, "", fn parser, acc ->
|
Enum.reduce(Pleroma.Config.get([__MODULE__, :providers], []), "", fn parser, acc ->
|
||||||
rendered_html =
|
rendered_html =
|
||||||
params
|
params
|
||||||
|> parser.build_tags()
|
|> parser.build_tags()
|
||||||
|
Loading…
Reference in New Issue
Block a user