Use `approval_required` in /api/v1/instance
authorAlex Gleason <alex@alexgleason.me>
Wed, 15 Jul 2020 22:04:30 +0000 (17:04 -0500)
committerAlex Gleason <alex@alexgleason.me>
Wed, 15 Jul 2020 22:04:30 +0000 (17:04 -0500)
lib/pleroma/web/mastodon_api/views/instance_view.ex
test/web/mastodon_api/controllers/instance_controller_test.exs

index 243067a7352c1353d2a854accb9585e5f3b8bd33..5389d63cd61feea2c9b4a1ca7657cef815d8db8d 100644 (file)
@@ -26,6 +26,7 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do
       thumbnail: Keyword.get(instance, :instance_thumbnail),
       languages: ["en"],
       registrations: Keyword.get(instance, :registrations_open),
+      approval_required: Keyword.get(instance, :account_approval_required),
       # Extra (not present in Mastodon):
       max_toot_chars: Keyword.get(instance, :limit),
       poll_limits: Keyword.get(instance, :poll_limits),
@@ -39,7 +40,6 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do
       pleroma: %{
         metadata: %{
           account_activation_required: Keyword.get(instance, :account_activation_required),
-          account_approval_required: Keyword.get(instance, :account_approval_required),
           features: features(),
           federation: federation(),
           fields_limits: fields_limits()
index 8a41832836779d844623140b38cbbaaf9f340f1d..6a9ccd97983c6f9dc50b2026b0a90045d0cb5007 100644 (file)
@@ -27,6 +27,7 @@ defmodule Pleroma.Web.MastodonAPI.InstanceControllerTest do
              "thumbnail" => _,
              "languages" => _,
              "registrations" => _,
+             "approval_required" => _,
              "poll_limits" => _,
              "upload_limit" => _,
              "avatar_upload_limit" => _,
@@ -38,7 +39,6 @@ defmodule Pleroma.Web.MastodonAPI.InstanceControllerTest do
            } = result
 
     assert result["pleroma"]["metadata"]["account_activation_required"] != nil
-    assert result["pleroma"]["metadata"]["account_approval_required"] != nil
     assert result["pleroma"]["metadata"]["features"]
     assert result["pleroma"]["metadata"]["federation"]
     assert result["pleroma"]["metadata"]["fields_limits"]