From 80b772795c0f5bbf0b5fdf5df94e1f5b09fcf58c Mon Sep 17 00:00:00 2001 From: Prakhar Pratyush Date: Wed, 19 Mar 2025 08:03:02 +0530 Subject: [PATCH] compose: Echo messages sent to "(no topic)"/"general chat" to topic="". Server treats messages sent to "(no topic) or "general chat" topic as being sent to empty string topic. Messages sent in web client to "(no topic)" and "general chat" were locally echoed to those respective topics, resulting in being narrowed to those topics. Ideally, the messages should be echoed in the empty string topic. This commit fixes that bug. --- web/src/compose.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/compose.js b/web/src/compose.js index 5fbbe9ce5e..c88c4893f9 100644 --- a/web/src/compose.js +++ b/web/src/compose.js @@ -108,7 +108,8 @@ export function create_message_object(message_content = compose_state.message_co message.to = people.user_ids_string_to_ids_array(message.to_user_ids); } } else { - message.topic = compose_state.topic(); + const topic = compose_state.topic(); + message.topic = util.is_topic_name_considered_empty(topic) ? "" : topic; const stream_id = compose_state.stream_id(); message.stream_id = stream_id; message.to = stream_id;