Skip to content

Node.js based forum software built for the modern web

fix: also use tx.compile in chat notif merge

Barış Soner Uşaklı6d22e33a1f2f
diff --git a/src/notifications.js b/src/notifications.js
index 63d5ab6d7f..5f0c305673 100644
--- a/src/notifications.js
+++ b/src/notifications.js
@@ -539,8 +539,8 @@ Notifications.merge = async function (notifications) {
const { roomId, roomName, type, user } = set[0];
const isGroupChat = type === 'new-group-chat';
notifObj.bodyShort = isGroupChat || (roomName !== `[[modules:chat.room-id, ${roomId}]]`) ?
- `[[notifications:new-messages-in, ${set.length}, ${roomName}]]` :
- `[[notifications:new-messages-from, ${set.length}, ${user.displayname}]]`;
+ translator.compile('notifications:new-messages-in', set.length, roomName) :
+ translator.compile('notifications:new-messages-from', set.length, user.displayname);
break;
}