Metadata: Move restriction check from Feed provider to activated_providers

This commit is contained in:
rinpatch 2020-09-07 15:06:06 +03:00
commit 0d2814ec8e
3 changed files with 10 additions and 17 deletions

View file

@ -7,7 +7,6 @@ defmodule Pleroma.Web.Metadata do
def build_tags(params) do
providers = [
Pleroma.Web.Metadata.Providers.Feed,
Pleroma.Web.Metadata.Providers.RelMe,
Pleroma.Web.Metadata.Providers.RestrictIndexing
| activated_providers()
@ -47,7 +46,7 @@ defmodule Pleroma.Web.Metadata do
defp activated_providers do
unless Pleroma.Config.restrict_unauthenticated_access?(:activities, :local) do
Pleroma.Config.get([__MODULE__, :providers], [])
[Pleroma.Web.Metadata.Providers.Feed | Pleroma.Config.get([__MODULE__, :providers], [])]
else
[]
end