mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-23 15:05:45 +00:00
Use approval_required
in /api/v1/instance
This commit is contained in:
parent
0d004a9d04
commit
9ce95fa68f
|
@ -26,6 +26,7 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do
|
||||||
thumbnail: Keyword.get(instance, :instance_thumbnail),
|
thumbnail: Keyword.get(instance, :instance_thumbnail),
|
||||||
languages: ["en"],
|
languages: ["en"],
|
||||||
registrations: Keyword.get(instance, :registrations_open),
|
registrations: Keyword.get(instance, :registrations_open),
|
||||||
|
approval_required: Keyword.get(instance, :account_approval_required),
|
||||||
# Extra (not present in Mastodon):
|
# Extra (not present in Mastodon):
|
||||||
max_toot_chars: Keyword.get(instance, :limit),
|
max_toot_chars: Keyword.get(instance, :limit),
|
||||||
poll_limits: Keyword.get(instance, :poll_limits),
|
poll_limits: Keyword.get(instance, :poll_limits),
|
||||||
|
@ -39,7 +40,6 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do
|
||||||
pleroma: %{
|
pleroma: %{
|
||||||
metadata: %{
|
metadata: %{
|
||||||
account_activation_required: Keyword.get(instance, :account_activation_required),
|
account_activation_required: Keyword.get(instance, :account_activation_required),
|
||||||
account_approval_required: Keyword.get(instance, :account_approval_required),
|
|
||||||
features: features(),
|
features: features(),
|
||||||
federation: federation(),
|
federation: federation(),
|
||||||
fields_limits: fields_limits()
|
fields_limits: fields_limits()
|
||||||
|
|
|
@ -27,6 +27,7 @@ defmodule Pleroma.Web.MastodonAPI.InstanceControllerTest do
|
||||||
"thumbnail" => _,
|
"thumbnail" => _,
|
||||||
"languages" => _,
|
"languages" => _,
|
||||||
"registrations" => _,
|
"registrations" => _,
|
||||||
|
"approval_required" => _,
|
||||||
"poll_limits" => _,
|
"poll_limits" => _,
|
||||||
"upload_limit" => _,
|
"upload_limit" => _,
|
||||||
"avatar_upload_limit" => _,
|
"avatar_upload_limit" => _,
|
||||||
|
@ -38,7 +39,6 @@ defmodule Pleroma.Web.MastodonAPI.InstanceControllerTest do
|
||||||
} = result
|
} = result
|
||||||
|
|
||||||
assert result["pleroma"]["metadata"]["account_activation_required"] != nil
|
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"]["features"]
|
||||||
assert result["pleroma"]["metadata"]["federation"]
|
assert result["pleroma"]["metadata"]["federation"]
|
||||||
assert result["pleroma"]["metadata"]["fields_limits"]
|
assert result["pleroma"]["metadata"]["fields_limits"]
|
||||||
|
|
Loading…
Reference in a new issue