Browse Source

InstanceView: Add chat limit, description limit

chores/our-libs-hex-releases
lain 4 years ago
parent
commit
cc8b4e48d9
2 changed files with 5 additions and 1 deletions
  1. +2
    -0
      lib/pleroma/web/mastodon_api/views/instance_view.ex
  2. +3
    -1
      test/web/mastodon_api/controllers/instance_controller_test.exs

+ 2
- 0
lib/pleroma/web/mastodon_api/views/instance_view.ex View File

@@ -34,6 +34,8 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do
background_upload_limit: Keyword.get(instance, :background_upload_limit),
banner_upload_limit: Keyword.get(instance, :banner_upload_limit),
background_image: Keyword.get(instance, :background_image),
chat_limit: Keyword.get(instance, :chat_limit),
description_limit: Keyword.get(instance, :description_limit),
pleroma: %{
metadata: %{
account_activation_required: Keyword.get(instance, :account_activation_required),


+ 3
- 1
test/web/mastodon_api/controllers/instance_controller_test.exs View File

@@ -32,7 +32,9 @@ defmodule Pleroma.Web.MastodonAPI.InstanceControllerTest do
"avatar_upload_limit" => _,
"background_upload_limit" => _,
"banner_upload_limit" => _,
"background_image" => _
"background_image" => _,
"chat_limit" => _,
"description_limit" => _
} = result

assert result["pleroma"]["metadata"]["account_activation_required"] != nil


Loading…
Cancel
Save