Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

register api: Rename max_icon_file_size.

Gaurav Pandey531cf041f133
diff --git a/static/js/realm_icon.js b/static/js/realm_icon.js
index 9d8c49023c4..a1d9ac88f7c 100644
--- a/static/js/realm_icon.js
+++ b/static/js/realm_icon.js
@@ -30,7 +30,7 @@ export function build_realm_icon_widget(upload_function) {
$("#realm-icon-upload-widget .image_file_input_error").expectOne(),
$("#realm-icon-upload-widget .image_upload_button").expectOne(),
upload_function,
- page_params.max_icon_file_size,
+ page_params.max_icon_file_size_mib,
);
}
diff --git a/zerver/lib/events.py b/zerver/lib/events.py
index 3d93e94745b..b4446909a3a 100644
--- a/zerver/lib/events.py
+++ b/zerver/lib/events.py
@@ -243,8 +243,7 @@ def fetch_initial_state_data(
# Important: Encode units in the client-facing API name.
state["max_avatar_file_size_mib"] = settings.MAX_AVATAR_FILE_SIZE
state["max_file_upload_size_mib"] = settings.MAX_FILE_UPLOAD_SIZE
- # TODO: This should have units in its name
- state["max_icon_file_size"] = settings.MAX_ICON_FILE_SIZE
+ state["max_icon_file_size_mib"] = settings.MAX_ICON_FILE_SIZE
# TODO: This should have units in its name
state["realm_upload_quota"] = realm.upload_quota_bytes()
diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml
index d45926f21ac..1b62ae6fcea 100644
--- a/zerver/openapi/zulip.yaml
+++ b/zerver/openapi/zulip.yaml
@@ -8526,7 +8526,7 @@ paths:
* "G" means generated by Gravatar (the default).
* "U" means uploaded by an organization administrator.
- max_icon_file_size:
+ max_icon_file_size_mib:
type: integer
description: |
Present if `realm` is present in `fetch_event_types`.
diff --git a/zerver/tests/test_home.py b/zerver/tests/test_home.py
index 630be671990..a439dda6d60 100644
--- a/zerver/tests/test_home.py
+++ b/zerver/tests/test_home.py
@@ -105,7 +105,7 @@ class HomeTest(ZulipTestCase):
"login_page",
"max_avatar_file_size_mib",
"max_file_upload_size_mib",
- "max_icon_file_size",
+ "max_icon_file_size_mib",
"max_logo_file_size",
"max_message_id",
"max_message_length",