)
end
- defp restrict_unauthenticated?(local_only) do
- config_key =
- if local_only do
- :local
- else
- :federated
- end
-
- Pleroma.Config.get([:restrict_unauthenticated, :timelines, config_key])
+ defp restrict_unauthenticated?(true = _local_only) do
+ Pleroma.Config.get([:restrict_unauthenticated, :timelines, :local])
+ end
+
+ defp restrict_unauthenticated?(_) do
+ Pleroma.Config.get([:restrict_unauthenticated, :timelines, :federated])
end
# GET /api/v1/timelines/public