diff --git a/public/src/modules/notifications.js b/public/src/modules/notifications.js index 8994ba008a..2fff715165 100644 --- a/public/src/modules/notifications.js +++ b/public/src/modules/notifications.js @@ -21,7 +21,7 @@ define(function() { if (!err && (data.read.length + data.unread.length) > 0) { for (x = 0; x < numUnread; x++) { notifEl.setAttribute('data-nid', data.unread[x].nid); - notifEl.className = 'unread'; + notifEl.className = data.unread[x].readClass; notifEl.innerHTML = '' + utils.relativeTime(data.unread[x].datetime, true) + '' + data.unread[x].text + ''; notifFrag.appendChild(notifEl.cloneNode(true)); } diff --git a/src/user.js b/src/user.js index 30ff0b3544..f9e6bc548a 100644 --- a/src/user.js +++ b/src/user.js @@ -932,6 +932,7 @@ var bcrypt = require('bcrypt'), notifications.get(nid, uid, function(notif_data) { // If the notification could not be found, silently drop it if (notif_data) { + notif_data.readClass = !notif_data.read ? 'label-warning' : ''; unread.push(notif_data); } else { db.sortedSetRemove('uid:' + uid + ':notifications:unread', nid);