mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
Merge branch 'master' of github.com:designcreateplay/NodeBB
This commit is contained in:
@@ -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 = '<a href="' + data.unread[x].path + '"><span class="pull-right">' + utils.relativeTime(data.unread[x].datetime, true) + '</span>' + data.unread[x].text + '</a>';
|
||||
notifFrag.appendChild(notifEl.cloneNode(true));
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user