Merge branch 'feature/mastodon-api-for-tootstream' into 'develop'
authorlambda <pleromagit@rogerbraun.net>
Sun, 8 Apr 2018 06:02:11 +0000 (06:02 +0000)
committerlambda <pleromagit@rogerbraun.net>
Sun, 8 Apr 2018 06:02:11 +0000 (06:02 +0000)
mastodon api emulation improvements for tootstream

Closes #101

See merge request pleroma/pleroma!100

lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
lib/pleroma/web/router.ex

index 97a618186388fc303205f4d8922b83e6d93da6a0..b00f1e15c1a58506e02f597fb4b821f7c9040410 100644 (file)
@@ -102,13 +102,14 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController 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")
index a33d03fc99714972033ec091afeb8b5a15c2b052..8ee27e63c08b77c59fc9742b901d56ec08834a96 100644 (file)
@@ -100,6 +100,7 @@ defmodule Pleroma.Web.Router 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)