From 52a1a40d7da25d35204f884e6a0ea24cbab932ef Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sat, 7 Apr 2018 22:27:00 +0000 Subject: [PATCH 1/2] mastodon api: implement /api/v1/lists stub --- lib/pleroma/web/router.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex index 5f27f3caa..f24007784 100644 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@ -100,6 +100,7 @@ def user_fetcher(username) do get("/domain_blocks", MastodonAPIController, :empty_array) get("/follow_requests", MastodonAPIController, :empty_array) get("/mutes", MastodonAPIController, :empty_array) + get("/lists", MastodonAPIController, :empty_array) get("/timelines/home", MastodonAPIController, :home_timeline) From 1857f403bea8d16f95a3b1ae46e07e2acd807c3c Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sat, 7 Apr 2018 22:27:16 +0000 Subject: [PATCH 2/2] mastodon api: report version as the Mastodon API version supported with the real version in parenthesis --- lib/pleroma/web/mastodon_api/mastodon_api_controller.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex index 6339704a2..f1cb6ec9d 100644 --- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex +++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex @@ -102,13 +102,14 @@ def user(conn, %{"id" => id}) do end @instance Application.get_env(:pleroma, :instance) + @mastodon_api_level "2.3.3" def masto_instance(conn, _params) do response = %{ uri: Web.base_url(), title: Keyword.get(@instance, :name), description: "A Pleroma instance, an alternative fediverse server", - version: Keyword.get(@instance, :version), + version: "#{@mastodon_api_level} (compatible; #{Keyword.get(@instance, :version)})", email: Keyword.get(@instance, :email), urls: %{ streaming_api: String.replace(Web.base_url(), ["http", "https"], "wss")