fetch_messages: Add support for empty topic names.

This commit is a part of the work to support empty string
as a topic name.

Previously, empty string was not a valid topic name.

Adds `allow_empty_topic_name` boolean parameter to `GET /messages`
and `GET /messages/{message_id}` endpoints to decide whether the
topic names in the fetched messages can be empty strings.

If False, the topic names in the fetched message will have the
value of `realm_empty_topic_display_name` field in `POST /register`
response replacing "" for channel messages.
This commit is contained in:
Prakhar Pratyush
2024-11-12 21:41:49 +05:30
committed by Tim Abbott
parent 3ba198e79a
commit 5d9beb3655
17 changed files with 229 additions and 13 deletions

View File

@@ -49,6 +49,7 @@ class EditMessageTest(ZulipTestCase):
search_fields={},
apply_markdown=False,
client_gravatar=False,
allow_empty_topic_name=True,
allow_edit_history=True,
user_profile=None,
realm=msg.realm,