Merge branch 'develop' into frontend-switcher-9000
authorFloatingGhost <hannah@coffee-and-dreams.uk>
Fri, 14 Apr 2023 15:56:10 +0000 (16:56 +0100)
committerFloatingGhost <hannah@coffee-and-dreams.uk>
Fri, 14 Apr 2023 15:56:10 +0000 (16:56 +0100)
1  2 
config/config.exs
config/description.exs
lib/pleroma/web/router.ex

diff --combined config/config.exs
index 8ed3c9cd9ffc313217da417e13dbf05d99c4438e,e216caf9d2c9913aa2c20be6785d594117971c01..c1e05114888588e94fa38d9cdea55f95f7066704
@@@ -261,7 -261,8 +261,8 @@@ config :pleroma, :instance
    privileged_staff: false,
    local_bubble: [],
    max_frontend_settings_json_chars: 100_000,
-   export_prometheus_metrics: true
+   export_prometheus_metrics: true,
+   federated_timeline_available: true
  
  config :pleroma, :welcome,
    direct_message: [
@@@ -745,9 -746,6 +746,9 @@@ config :pleroma, :frontends
    primary: %{"name" => "pleroma-fe", "ref" => "stable"},
    admin: %{"name" => "admin-fe", "ref" => "stable"},
    mastodon: %{"name" => "mastodon-fe", "ref" => "akkoma"},
 +  pickable: [
 +    "pleroma-fe/stable"
 +  ],
    swagger: %{
      "name" => "swagger-ui",
      "ref" => "stable",
@@@ -813,7 -811,7 +814,7 @@@ config :pleroma, :majic_pool, size: 
  private_instance? = :if_instance_is_private
  
  config :pleroma, :restrict_unauthenticated,
-   timelines: %{local: private_instance?, federated: private_instance?},
+   timelines: %{local: private_instance?, federated: private_instance?, bubble: true},
    profiles: %{local: private_instance?, remote: private_instance?},
    activities: %{local: private_instance?, remote: private_instance?}
  
diff --combined config/description.exs
index 75fd23566b1f3728cf8f42462ce77f1188c65fe0,6520bc29aa7678656a0cbcf0a93a3033ad2121e0..d329f8afa156e3548a34c85b2e205ac58f215603
@@@ -969,6 -969,12 +969,12 @@@ config :pleroma, :config_description, 
          key: :export_prometheus_metrics,
          type: :boolean,
          description: "Enable prometheus metrics (at /api/v1/akkoma/metrics)"
+       },
+       %{
+         key: :federated_timeline_available,
+         type: :boolean,
+         description:
+           "Let people view the 'firehose' feed of all public statuses from all instances."
        }
      ]
    },
              key: :federated,
              type: :boolean,
              description: "Disallow viewing the whole known network timeline."
+           },
+           %{
+             key: :bubble,
+             type: :boolean,
+             description: "Disallow viewing the bubble timeline."
            }
          ]
        },
          description:
            "A map containing available frontends and parameters for their installation.",
          children: frontend_options
 +      },
 +      %{
 +          key: :pickable,
 +          type: {:list, :string},
 +          description:
 +            "A list containing all frontends users can pick as their preference, format is :name/:ref, e.g pleroma-fe/stable."
        }
      ]
    },
index d02ae3460f40895b77e5f91da8ab68c6eb584a16,24ca5c37bffde89f9f81f9fd893ebb12ceb5fae1..7550eefdf5663db00af287db1767312b0b4c6fec
@@@ -466,29 -466,6 +466,29 @@@ defmodule Pleroma.Web.Router d
      put("/statuses/:id/emoji_reactions/:emoji", EmojiReactionController, :create)
    end
  
 +  scope "/akkoma/", Pleroma.Web.AkkomaAPI do
 +    pipe_through(:browser)
 +
 +    get("/frontend", FrontendSwitcherController, :switch)
 +    post("/frontend", FrontendSwitcherController, :do_switch)
 +  end
 +
 +  scope "/api/v1/akkoma", Pleroma.Web.AkkomaAPI do
 +    pipe_through(:api)
 +
 +    get(
 +      "/api/v1/akkoma/preferred_frontend/available",
 +      FrontendSettingsController,
 +      :available_frontends
 +    )
 +
 +    put(
 +      "/api/v1/akkoma/preferred_frontend",
 +      FrontendSettingsController,
 +      :update_preferred_frontend
 +    )
 +  end
 +
    scope "/api/v1/akkoma", Pleroma.Web.AkkomaAPI do
      pipe_through(:authenticated_api)
      get("/metrics", MetricsController, :show)
      get("/timelines/home", TimelineController, :home)
      get("/timelines/direct", TimelineController, :direct)
      get("/timelines/list/:list_id", TimelineController, :list)
-     get("/timelines/bubble", TimelineController, :bubble)
  
      get("/announcements", AnnouncementController, :index)
      post("/announcements/:id/dismiss", AnnouncementController, :mark_read)
  
      get("/timelines/public", TimelineController, :public)
      get("/timelines/tag/:tag", TimelineController, :hashtag)
+     get("/timelines/bubble", TimelineController, :bubble)
  
      get("/polls/:id", PollController, :show)