mirror of https://github.com/zulip/zulip.git
message_header: Fix order of group direct message recipients.
Earlier, the order of recipients in recipient row of group direct message weren't in the same sorting pattern as that of message title which would result in inconsistent order of recipient names. This commit fixes the behaviour in `private_message_header` in recipient row to sort the names using `strcmp`. Fixes part of zulip#27375. Co-authored-by: richardshaju <richardshaju66@gmail.com>
This commit is contained in:
parent
b9425d4d10
commit
9f94e6c58d
|
@ -212,7 +212,7 @@ function get_users_for_recipient_row(message) {
|
|||
});
|
||||
|
||||
function compare_by_name(a, b) {
|
||||
return a.full_name < b.full_name ? -1 : a.full_name > b.full_name ? 1 : 0;
|
||||
return util.strcmp(a.full_name, b.full_name);
|
||||
}
|
||||
|
||||
return users.sort(compare_by_name);
|
||||
|
|
Loading…
Reference in New Issue