diff --git a/lib/pleroma/web/mastodon_api/views/instance_view.ex b/lib/pleroma/web/mastodon_api/views/instance_view.ex index 73205fb6db..b7ea221908 100644 --- a/lib/pleroma/web/mastodon_api/views/instance_view.ex +++ b/lib/pleroma/web/mastodon_api/views/instance_view.ex @@ -47,6 +47,9 @@ def render("show.json", _) do }, stats: %{mau: Pleroma.User.active_user_count()}, vapid_public_key: Keyword.get(Pleroma.Web.Push.vapid_config(), :public_key) + }, + soapbox: %{ + version: Soapbox.version() } } end diff --git a/lib/soapbox.ex b/lib/soapbox.ex new file mode 100644 index 0000000000..ab7ef4a16c --- /dev/null +++ b/lib/soapbox.ex @@ -0,0 +1,5 @@ +defmodule Soapbox do + @version "0.0.99" + + def version, do: @version +end diff --git a/test/pleroma/web/mastodon_api/controllers/instance_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/instance_controller_test.exs index b998566591..6803113b6b 100644 --- a/test/pleroma/web/mastodon_api/controllers/instance_controller_test.exs +++ b/test/pleroma/web/mastodon_api/controllers/instance_controller_test.exs @@ -48,6 +48,7 @@ test "get instance information", %{conn: conn} do assert result["pleroma"]["metadata"]["fields_limits"] assert result["pleroma"]["vapid_public_key"] assert result["pleroma"]["stats"]["mau"] == 0 + assert result["soapbox"]["version"] =~ "." assert email == from_config_email assert thumbnail == from_config_thumbnail