Add fieldsLimit to metadata of nodeinfo
authorkPherox <admin@mail.kr-kp.com>
Fri, 15 Nov 2019 09:51:55 +0000 (18:51 +0900)
committerkPherox <admin@mail.kr-kp.com>
Fri, 15 Nov 2019 09:52:31 +0000 (18:52 +0900)
lib/pleroma/web/nodeinfo/nodeinfo_controller.ex

index 486b9f6a4dce7d685a92e08ea42de1610f7445f5..abcf46034d10c0cc6073eeb6364e8eb02257ab31 100644 (file)
@@ -120,6 +120,12 @@ defmodule Pleroma.Web.Nodeinfo.NodeinfoController do
           banner: Config.get([:instance, :banner_upload_limit]),
           background: Config.get([:instance, :background_upload_limit])
         },
+        fieldsLimits: %{
+          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])
+        },
         accountActivationRequired: Config.get([:instance, :account_activation_required], false),
         invitesEnabled: Config.get([:instance, :invites_enabled], false),
         mailerEnabled: Config.get([Pleroma.Emails.Mailer, :enabled], false),