Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

compose: Simplify convert_mentions_to_silent_in_direct_messages.

Tim Abbotte32468e97fc5
diff --git a/web/src/compose_validate.js b/web/src/compose_validate.js
index e8f64c01b1b..6a107228e06 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;
}