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.

people: Remove unused reply_to_to_user_ids_string.

Shubham Padiaa3491dec13c4
diff --git a/web/src/people.ts b/web/src/people.ts
index c4c7f691530..87961cf8cff 100644
--- a/web/src/people.ts
+++ b/web/src/people.ts
@@ -388,28 +388,6 @@ export function emails_strings_to_user_ids_array(emails_string: string): number[
return user_ids_array;
}
-export function reply_to_to_user_ids_string(emails_string: string): string | undefined {
- // This is basically emails_strings_to_user_ids_string
- // without blueslip warnings, since it can be called with
- // invalid data.
- const emails = emails_string.split(",");
-
- let user_ids = util.try_parse_as_truthy(
- emails.map((email) => {
- const person = get_by_email(email);
- return person?.user_id;
- }),
- );
-
- if (user_ids === undefined) {
- return undefined;
- }
-
- user_ids = util.sorted_ids(user_ids);
-
- return user_ids.join(",");
-}
-
export function user_ids_to_full_names_string(user_ids: number[]): string {
const sorted_names = user_ids.map((user_id) => {
const person = maybe_get_user_by_id(user_id);
diff --git a/web/tests/people.test.cjs b/web/tests/people.test.cjs
index 5eb5892aec0..9b289478579 100644
--- a/web/tests/people.test.cjs
+++ b/web/tests/people.test.cjs
@@ -970,11 +970,6 @@ run_test("multi_user_methods", () => {
let user_ids_string = people.emails_strings_to_user_ids_string(emails_string);
assert.equal(user_ids_string, "401,402");
- user_ids_string = people.reply_to_to_user_ids_string(emails_string);
- assert.equal(user_ids_string, "401,402");
-
- assert.equal(people.reply_to_to_user_ids_string("[email protected]"), undefined);
-
assert.equal(people.user_ids_string_to_slug("401,402"), "401,402-group");
assert.equal(people.user_ids_string_to_slug("402"), "402-whatever-402");
assert.equal(people.user_ids_to_slug([401, 402]), "401,402-group");