[#2046] Defaulted pleroma/restrict_unauthenticated basing on instance privacy setting (i.e. restrict on private instances only by default).

This commit is contained in:
Ivan Tashkinov 2020-08-14 20:55:45 +03:00
commit 95529ab709
7 changed files with 31 additions and 37 deletions

View file

@ -16,7 +16,7 @@ defmodule Pleroma.Web.Preload.Providers.Timelines do
end
def build_public_tag(acc, params) do
if Pleroma.Config.get([:restrict_unauthenticated, :timelines, :federated], true) do
if Pleroma.Config.restrict_unauthenticated_access?(:timelines, :federated) do
acc
else
Map.put(acc, @public_url, public_timeline(params))