get_stream_topics: Add support for empty topic name.

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 /users/me/{stream_id}/topics` endpoint to decide
whether the topic names in the fetched `topics` array
can be empty strings.

If False, the topic names in the fetched response will
have the value of `realm_empty_topic_display_name` field
in `POST /register` response replacing "".

Fixes part of #23291.
This commit is contained in:
Prakhar Pratyush
2025-01-22 16:51:17 +05:30
committed by Tim Abbott
parent a76042ce39
commit 181572021d
7 changed files with 74 additions and 9 deletions

View File

@@ -124,6 +124,10 @@ deactivated groups.
Added `allow_empty_topic_name` boolean parameter to decide whether the
topic names in the fetched message history objects can be empty strings.
* [`GET /users/me/{stream_id}/topics`](/api/get-stream-topics):
Added `allow_empty_topic_name` boolean parameter to decide whether the
topic names in the fetched `topics` array can be empty strings.
* [`POST /register`](/api/register-queue): For clients that don't support
the `empty_topic_name` [client capability](/api/register-queue#parameter-client_capabilities),
the `topic` field in the `unread_msgs` object and `topic_name` field