diff options
author | Rin Toshaka <rinpatch@sdf.org> | 2018-12-08 21:48:49 +0100 |
---|---|---|
committer | Rin Toshaka <rinpatch@sdf.org> | 2018-12-08 21:48:49 +0100 |
commit | 15616eda5e98bb13b1382109fb1f84537c58fcb1 (patch) | |
tree | 67b9714edcdbf552b4b958f4a7d2027665a85e44 /lib | |
parent | 578051809f38c3d5d65155e264203c3b978a10a8 (diff) | |
download | pleroma-15616eda5e98bb13b1382109fb1f84537c58fcb1.tar.gz |
Make uploadlimit an object that stores upload limits for avatars, banners, backgrounds, general content
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/twitter_api/controllers/util_controller.ex | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/pleroma/web/twitter_api/controllers/util_controller.ex b/lib/pleroma/web/twitter_api/controllers/util_controller.ex index 36ecefa76..1459f3c90 100644 --- a/lib/pleroma/web/twitter_api/controllers/util_controller.ex +++ b/lib/pleroma/web/twitter_api/controllers/util_controller.ex @@ -160,12 +160,19 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do vapid_public_key = Keyword.get(Application.get_env(:web_push_encryption, :vapid_details), :public_key) + uploadlimit = %{ + uploadlimit: to_string(Keyword.get(instance, :upload_limit)), + avatarlimit: to_string(Keyword.get(instance, :avatar_upload_limit)), + backgroundlimit: to_string(Keyword.get(instance, :background_upload_limit)), + bannerlimit: to_string(Keyword.get(instance, :banner_upload_limit)) + } + data = %{ name: Keyword.get(instance, :name), description: Keyword.get(instance, :description), server: Web.base_url(), textlimit: to_string(Keyword.get(instance, :limit)), - uploadlimit: to_string(Keyword.get(instance, :upload_limit)), + uploadlimit: uploadlimit, closed: if(Keyword.get(instance, :registrations_open), do: "0", else: "1"), private: if(Keyword.get(instance, :public, true), do: "0", else: "1"), vapidPublicKey: vapid_public_key |