Merge remote-tracking branch 'remotes/origin/develop' into 2168-media-preview-proxy
[akkoma] / lib / pleroma / web / mastodon_api / controllers / timeline_controller.ex
index 4bbb82c2380ec3efdad66db3dd51ca84b37928f8..ab7b1d6aa5859025cd66630ff27eb89d3041ad9c 100644 (file)
@@ -88,15 +88,12 @@ defmodule Pleroma.Web.MastodonAPI.TimelineController do
     )
   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