bug fix: Fix huddles in "Private Messages".

If two user_ids in a recent huddle have ids
that sort lexically differently than numerically,
such as 7 and 66, then we were creating two
different buckets in pm_conversations.

This regression was introduced in
263ac0eb45 on
November 21, 2019.
This commit is contained in:
Steve Howell
2020-01-01 14:55:36 +00:00
committed by Tim Abbott
parent 71dae1b92a
commit aed813f44c
2 changed files with 5 additions and 3 deletions

View File

@@ -23,6 +23,8 @@ exports.recent = (function () {
// The server sends [] for self-PMs.
user_ids = [people.my_current_user_id()];
}
user_ids.sort((a, b) => a - b);
const user_ids_string = user_ids.join(',');
let conversation = recent_message_ids.get(user_ids_string);