Let favourites and emoji reactions optionally be hidden
[akkoma] / lib / pleroma / web / mastodon_api / views / instance_view.ex
index 347480d4949cd7c3020251bf4de3f0b909b59ddb..cd3bc7f00c525f5413a6be3e38613dc44e3b9167 100644 (file)
@@ -34,12 +34,15 @@ 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),
           features: features(),
           federation: federation(),
-          fields_limits: fields_limits()
+          fields_limits: fields_limits(),
+          post_formats: Config.get([:instance, :allowed_post_formats])
         },
         vapid_public_key: Keyword.get(Pleroma.Web.Push.vapid_config(), :public_key)
       }
@@ -93,10 +96,10 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do
 
   def fields_limits do
     %{
-      maxFields: Config.get([:instance, :max_account_fields]),
-      maxRemoteFields: Config.get([:instance, :max_remote_account_fields]),
-      nameLength: Config.get([:instance, :account_field_name_length]),
-      valueLength: Config.get([:instance, :account_field_value_length])
+      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