diff options
author | feld <feld@feld.me> | 2020-07-02 18:12:03 +0000 |
---|---|---|
committer | feld <feld@feld.me> | 2020-07-02 18:12:03 +0000 |
commit | 4f8e0170e98cb91e11e70a5cb7dc3972b3035599 (patch) | |
tree | cf7958401d4d7fd48e6244cd1035f5323032b85f /lib | |
parent | 4c044f62258b33a95b8281e1eb42a5e0ce47d42d (diff) | |
parent | 8121e46f25b2ea74bdcc635cab20bd17183bcca2 (diff) | |
download | pleroma-4f8e0170e98cb91e11e70a5cb7dc3972b3035599.tar.gz |
Merge branch 'activation-meta' into 'develop'
Add more FE-required fields to /api/v1/instance
See merge request pleroma/pleroma!2613
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/instance_view.ex | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/instance_view.ex b/lib/pleroma/web/mastodon_api/views/instance_view.ex index 35c2fc25c..89e48fba5 100644 --- a/lib/pleroma/web/mastodon_api/views/instance_view.ex +++ b/lib/pleroma/web/mastodon_api/views/instance_view.ex @@ -36,8 +36,10 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do background_image: Keyword.get(instance, :background_image), pleroma: %{ metadata: %{ + account_activation_required: Keyword.get(instance, :account_activation_required), features: features(), - federation: federation() + federation: federation(), + fields_limits: fields_limits() }, vapid_public_key: Keyword.get(Pleroma.Web.Push.vapid_config(), :public_key) } @@ -88,4 +90,13 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do end |> Map.put(:enabled, Config.get([:instance, :federating])) end + + def fields_limits do + %{ + max_fields: Config.get([:instance, :max_account_fields]), + max_remote_fields: Config.get([:instance, :max_remote_account_fields]), + name_length: Config.get([:instance, :account_field_name_length]), + value_length: Config.get([:instance, :account_field_value_length]) + } + end end |