From 85ee5255bcf56ab350018d468d9465b787e504a3 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 19 Jan 2024 11:09:23 -0800 Subject: [PATCH] compose: Simplify convert_mentions_to_silent_in_direct_messages. The behavior to replace existing message content was leftover code from a previous version of the mechanism, and not intended. --- web/src/compose_validate.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/web/src/compose_validate.js b/web/src/compose_validate.js index e8f64c01b1..6a107228e0 100644 --- a/web/src/compose_validate.js +++ b/web/src/compose_validate.js @@ -851,11 +851,6 @@ export function convert_mentions_to_silent_in_direct_messages(mention_text, full return mention_text; } - const mention_str = people.get_mention_syntax(full_name, user_id, false); - const silent_mention_str = people.get_mention_syntax(full_name, user_id, true); - mention_text = mention_text.replace(mention_str, silent_mention_str); - // also replace other mentions... - compose_ui.replace_syntax(mention_str, silent_mention_str); - - return mention_text; + const silent_mention_text = people.get_mention_syntax(full_name, user_id, true); + return silent_mention_text; }