From 6147a4d0821f601d600b2d59b1653c6433866113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 12 Mar 2026 22:02:03 -0400 Subject: [PATCH] fix: merged chat notifications if all the messages are from the same user usernames.length ends up being 1 so need to use default translation string and not -dual/-triple/-multiple variants --- src/notifications.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/notifications.js b/src/notifications.js index d06108e8ca..e38ccd215f 100644 --- a/src/notifications.js +++ b/src/notifications.js @@ -519,7 +519,9 @@ Notifications.merge = async function (notifications) { differentiators.forEach((differentiator) => { function typeFromLength(items) { - if (items.length === 2) { + if (items.length <= 1) { + return ''; + } else if (items.length === 2) { return 'dual'; } else if (items.length === 3) { return 'triple'; @@ -553,7 +555,7 @@ Notifications.merge = async function (notifications) { const type = typeFromLength(usernames); const isMultiple = type === 'multiple'; const txArgs = [ - `${mergeId}-${type}`, + `${mergeId}${type ? '-type' : ''}`, ...usernames.slice(0, usernames.length <= 3 ? 3 : 2), ...(isMultiple ? [usernames.length - 2] : []), notifObj.roomIcon, @@ -574,7 +576,7 @@ Notifications.merge = async function (notifications) { const type = typeFromLength(usernames); const isMultiple = type === 'multiple'; const txArgs = [ - `${mergeId}-${type}`, + `${mergeId}${type ? '-type' : ''}`, ...usernames.slice(0, usernames.length <= 3 ? 3 : 2), ...(isMultiple ? [usernames.length - 2] : []), utils.decodeHTMLEntities(notifObj.topicTitle || ''),