Browse Source

InstanceView: Expose background image link.

This will make it easier for more clients to support this feature.
chore/expose-invalidation-to-adminfe
lain 4 years ago
parent
commit
188b32145e
3 changed files with 4 additions and 1 deletions
  1. +1
    -0
      config/config.exs
  2. +1
    -0
      lib/pleroma/web/mastodon_api/views/instance_view.ex
  3. +2
    -1
      test/web/mastodon_api/controllers/instance_controller_test.exs

+ 1
- 0
config/config.exs View File

@@ -183,6 +183,7 @@ config :pleroma, :instance,
email: "example@example.com",
notify_email: "noreply@example.com",
description: "A Pleroma instance, an alternative fediverse server",
background_image: "/images/city.jpg",
limit: 5_000,
chat_limit: 5_000,
remote_limit: 100_000,


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

@@ -33,6 +33,7 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do
avatar_upload_limit: Keyword.get(instance, :avatar_upload_limit),
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),
pleroma: %{
metadata: %{
features: features(),


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

@@ -31,7 +31,8 @@ defmodule Pleroma.Web.MastodonAPI.InstanceControllerTest do
"upload_limit" => _,
"avatar_upload_limit" => _,
"background_upload_limit" => _,
"banner_upload_limit" => _
"banner_upload_limit" => _,
"background_image" => _
} = result

assert result["pleroma"]["metadata"]["features"]


Loading…
Cancel
Save