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 <richardshaju66@gmail.com>
This commit is contained in:
Pratik Chanda 2024-05-22 17:42:04 +05:30 committed by Tim Abbott
parent 54a7cefede
commit eeae434625
1 changed files with 4 additions and 2 deletions

View File

@ -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 {