* `max_jobs`: The maximum amount of parallel federation jobs running at the same time.
* `initial_timeout`: The initial timeout in seconds
* `max_retries`: The maximum number of times a federation job is retried
+
+## Pleroma.Web.Metadata
+* `providers`: a list of metadata providers to enable. Providers avalible:
+ * Pleroma.Web.Metadata.Providers.OpenGraph
+ * Pleroma.Web.Metadata.Providers.TwitterCard
defmodule Pleroma.Web.Metadata do
alias Phoenix.HTML
- @parsers Pleroma.Config.get([:metadata, :providers], [])
+ @providers Pleroma.Config.get([__MODULE__, :providers], [])
def get_cached_tags(%{activity: activity, user: user} = params) do
# We don't need to use the both activity and a user since the object can't change it's content
key = "#{:erlang.term_to_binary(user)}#{activity.data["id"]}"
end
def build_tags(params) do
- Enum.reduce(@parsers, "", fn parser, acc ->
+ Enum.reduce(@providers, "", fn parser, acc ->
rendered_html =
params
|> parser.build_tags()