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: [
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",
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?}
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."
}
]
},
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)