From eeae4346258ac1f149962db088c316187670f34f Mon Sep 17 00:00:00 2001 From: Pratik Chanda Date: Wed, 22 May 2024 17:42:04 +0530 Subject: [PATCH] left_sidebar: Fix order of group pm recipients in left sidebar. Earlier in left sidebar, the recipient names were not sorted consistently with the message header of the pm. This commit fixes the behaviour by sorting the recipient names in left sidebar with `make_strcmp`. Fixes part of zulip#27375. Co-authored-by: richardshaju --- web/src/people.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/src/people.ts b/web/src/people.ts index ee516d3522..f6ad43a33a 100644 --- a/web/src/people.ts +++ b/web/src/people.ts @@ -432,8 +432,10 @@ export function get_recipients(user_ids_string: string): string { return my_full_name(); } - const names = get_display_full_names(other_ids).sort(); - return names.join(", "); + const names = get_display_full_names(other_ids); + const sorted_names = names.sort(util.make_strcmp()); + + return sorted_names.join(", "); } export function pm_reply_user_string(message: Message | MessageWithBooleans): string | undefined {