mirror of https://github.com/zulip/zulip.git
echo: Fix incorrect check for message `topic`.
The actual check should be for `falsy` (to handle empty string) and not undefined, since topic is an empty string for private messages.
This commit is contained in:
parent
2e12d3cd25
commit
3dd8a4c6d5
|
@ -172,7 +172,7 @@ export function insert_local_message(message_request, local_id_float, insert_new
|
|||
message.local_id = local_id_float.toString();
|
||||
message.locally_echoed = true;
|
||||
message.id = local_id_float;
|
||||
if (message.topic === undefined) {
|
||||
if (!message.topic) {
|
||||
message.topic_links = [];
|
||||
} else {
|
||||
message.topic_links = markdown.get_topic_links(message.topic);
|
||||
|
|
|
@ -266,7 +266,6 @@ test_ui("send_message", ({override, override_rewire, mock_template}) => {
|
|||
|
||||
const server_message_id = 127;
|
||||
override(markdown, "render", noop);
|
||||
override(markdown, "get_topic_links", noop);
|
||||
|
||||
override_rewire(echo, "try_deliver_locally", (message_request) => {
|
||||
const local_id_float = 123.04;
|
||||
|
|
Loading…
Reference in New Issue