notification: Use display_recipient to get other_recipient length.

This commit is contained in:
Aman Agrawal
2023-10-22 05:51:18 +00:00
committed by Tim Abbott
parent 2d2e2f8882
commit 192306f9ee

View File

@@ -104,8 +104,7 @@ function get_notification_title(message, content, msg_count) {
if (content.length + title.length + other_recipients.length > 230) {
// Then count how many people are in the conversation and summarize
// by saying the conversation is with "you and [number] other people"
other_recipients =
other_recipients.replaceAll(/[^,]/g, "").length + " other people";
other_recipients = message.display_recipient.length - 2 + " other people";
}
title += " (to you and " + other_recipients + ")";