mastodon api: report version as the Mastodon API version supported with the real...
authorWilliam Pitcock <nenolod@dereferenced.org>
Sat, 7 Apr 2018 22:27:16 +0000 (22:27 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Sat, 7 Apr 2018 22:29:28 +0000 (17:29 -0500)
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex

index 6339704a25061682b64cda71f6c4ac0e53572a1f..f1cb6ec9dafd342fbe4d20625e720309540262a8 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")