forked from AkkomaGang/akkoma
Add config doc
This commit is contained in:
parent
a9c27e137d
commit
bfe2a11a6b
2 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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 @@ def get_cached_tags(params) 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()
|
||||
|
|
Loading…
Reference in a new issue