aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/config.md5
-rw-r--r--lib/pleroma/web/metadata.ex4
2 files changed, 7 insertions, 2 deletions
diff --git a/docs/config.md b/docs/config.md
index e3738271b..c2104a9e8 100644
--- a/docs/config.md
+++ b/docs/config.md
@@ -210,3 +210,8 @@ curl "http://localhost:4000/api/pleroma/admin/invite_token?admin_token=somerando
* `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
diff --git a/lib/pleroma/web/metadata.ex b/lib/pleroma/web/metadata.ex
index 23f152e06..ddc74fb0d 100644
--- a/lib/pleroma/web/metadata.ex
+++ b/lib/pleroma/web/metadata.ex
@@ -1,7 +1,7 @@
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"]}"
@@ -29,7 +29,7 @@ defmodule Pleroma.Web.Metadata do
end
def build_tags(params) do
- Enum.reduce(@parsers, "", fn parser, acc ->
+ Enum.reduce(@providers, "", fn parser, acc ->
rendered_html =
params
|> parser.build_tags()