register: Pass channel folder max name and description length.

This commit adds "max_channel_folder_name" and
"max_channel_folder_description" fields to response.

Also updated webapp to use these fields instead of hardcoding
the values.
This commit is contained in:
Sahil Batra
2025-07-29 07:59:17 +05:30
committed by Tim Abbott
parent 945e5553e4
commit db00ceaeb2
8 changed files with 46 additions and 7 deletions

View File

@@ -89,6 +89,7 @@ from zerver.lib.users import (
)
from zerver.lib.utils import optional_bytes_to_mib
from zerver.models import (
ChannelFolder,
Client,
CustomProfileField,
Draft,
@@ -560,6 +561,8 @@ def fetch_initial_state_data(
state["max_bulk_new_subscription_messages"] = settings.MAX_BULK_NEW_SUBSCRIPTION_MESSAGES
state["max_topic_length"] = MAX_TOPIC_NAME_LENGTH
state["max_message_length"] = settings.MAX_MESSAGE_LENGTH
state["max_channel_folder_name_length"] = ChannelFolder.MAX_NAME_LENGTH
state["max_channel_folder_description_length"] = ChannelFolder.MAX_DESCRIPTION_LENGTH
if realm.demo_organization_scheduled_deletion_date is not None:
state["demo_organization_scheduled_deletion_date"] = datetime_to_timestamp(
realm.demo_organization_scheduled_deletion_date