mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
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:
committed by
Tim Abbott
parent
3ba198e79a
commit
5d9beb3655
@@ -248,6 +248,11 @@ python_rules = RuleList(
|
||||
"exclude_line": {
|
||||
("zerver/lib/message.py", "message__subject__iexact=message.topic_name(),"),
|
||||
("zerver/views/streams.py", "message__subject__iexact=topic_name,"),
|
||||
("zerver/lib/message_cache.py", 'and obj["subject"] == ""'),
|
||||
(
|
||||
"zerver/lib/message_cache.py",
|
||||
'obj["subject"] = Message.EMPTY_TOPIC_FALLBACK_NAME',
|
||||
),
|
||||
},
|
||||
"include_only": {
|
||||
"zerver/data_import/",
|
||||
|
||||
Reference in New Issue
Block a user