diff options
author | Alex Gleason <alex@alexgleason.me> | 2020-07-15 17:04:30 -0500 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2020-07-15 17:04:30 -0500 |
commit | 9ce95fa68f933c911c10e640b9a32ddae8a631c9 (patch) | |
tree | 724ded430a34c0b47dd488dc8f112529cd0948aa | |
parent | 0d004a9d046f279be8462e8c751b5f1bcec3d35b (diff) | |
download | pleroma-9ce95fa68f933c911c10e640b9a32ddae8a631c9.tar.gz |
Use `approval_required` in /api/v1/instance
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/instance_view.ex | 2 | ||||
-rw-r--r-- | test/web/mastodon_api/controllers/instance_controller_test.exs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/instance_view.ex b/lib/pleroma/web/mastodon_api/views/instance_view.ex index 243067a73..5389d63cd 100644 --- a/lib/pleroma/web/mastodon_api/views/instance_view.ex +++ b/lib/pleroma/web/mastodon_api/views/instance_view.ex @@ -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() diff --git a/test/web/mastodon_api/controllers/instance_controller_test.exs b/test/web/mastodon_api/controllers/instance_controller_test.exs index 8a4183283..6a9ccd979 100644 --- a/test/web/mastodon_api/controllers/instance_controller_test.exs +++ b/test/web/mastodon_api/controllers/instance_controller_test.exs @@ -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"] |