recent topics: Fix exception displaying PMs with 5+ senders.

The previous logic incorrectly tried to map elements of the list of
user IDs beyond 4 senders to their `.id` fields, which were undefined;
the correct thing to do is just use the list of user IDs that we
already have.
This commit is contained in:
Tim Abbott
2023-02-10 15:32:22 -08:00
parent 39255a5ed0
commit 29c6b4b9f2

View File

@@ -445,9 +445,7 @@ function format_conversation(conversation_data) {
senders = all_senders.slice(-MAX_AVATAR);
// Collect extra senders fullname for tooltip.
extra_sender_ids = all_senders.slice(0, -MAX_AVATAR);
displayed_other_senders = extra_sender_ids
.slice(-MAX_EXTRA_SENDERS)
.map((sender) => sender.id);
displayed_other_senders = extra_sender_ids.slice(-MAX_EXTRA_SENDERS);
}
context.senders = people.sender_info_for_recent_topics_row(senders);