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.

recent_conversations: Parsing of user_ids is done using function call.

Ujjawal Modi87215d1a9871
diff --git a/web/src/people.js b/web/src/people.js
index 68667f27ace..b7976eafd64 100644
--- a/web/src/people.js
+++ b/web/src/people.js
@@ -50,7 +50,7 @@ export function init() {
// WE INITIALIZE DATA STRUCTURES HERE!
init();
-function split_to_ints(lst) {
+export function split_to_ints(lst) {
return lst.split(",").map((s) => Number.parseInt(s, 10));
}
diff --git a/web/src/pm_conversations.js b/web/src/pm_conversations.js
index c9aa5961fc1..56e510f4a4b 100644
--- a/web/src/pm_conversations.js
+++ b/web/src/pm_conversations.js
@@ -15,7 +15,7 @@ export function is_partner(user_id) {
function filter_muted_pms(conversation) {
// We hide muted users from the top left corner, as well as those huddles
// in which all participants are muted.
- const recipients = conversation.user_ids_string.split(",").map((id) => Number.parseInt(id, 10));
+ const recipients = people.split_to_ints(conversation.user_ids_string);
if (recipients.every((id) => muted_users.is_user_muted(id))) {
return false;