nodeinfo: expose configured upload limits
authorWilliam Pitcock <nenolod@dereferenced.org>
Mon, 29 Oct 2018 20:07:52 +0000 (20:07 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Mon, 29 Oct 2018 20:07:52 +0000 (20:07 +0000)
lib/pleroma/web/nodeinfo/nodeinfo_controller.ex

index 59b0ce3e15754af2bb699641a52417c7de3d86ef..5446179cbba68960501eb8b92c26558fa7dab509 100644 (file)
@@ -113,6 +113,12 @@ defmodule Pleroma.Web.Nodeinfo.NodeinfoController do
         staffAccounts: staff_accounts,
         federation: federation_response,
         postFormats: Keyword.get(instance, :allowed_post_formats),
+        uploadLimits: %{
+          general: Keyword.get(instance, :upload_limit),
+          avatar: Keyword.get(instance, :avatar_upload_limit),
+          banner: Keyword.get(instance, :banner_upload_limit),
+          background: Keyword.get(instance, :background_upload_limit)
+        },
         features: features
       }
     }