fixing replying (whoops)

v1.18.x
Julian Lam 11 years ago
parent d9ee9bf5e3
commit 041e77f688

@ -184,21 +184,6 @@
notificationIcon.className = 'fa fa-circle active';
}
});
// jQuery.getJSON(RELATIVE_PATH + '/api/unread/total', function(data) {
// var badge = jQuery('#numUnreadBadge');
// badge.html(data.count > 20 ? '20+' : data.count);
// if (data.count > 0) {
// badge
// .removeClass('badge-inverse')
// .addClass('badge-important');
// } else {
// badge
// .removeClass('badge-important')
// .addClass('badge-inverse');
// }
// });
},
isRelativeUrl: function(url) {

@ -398,7 +398,6 @@ var async = require('async'),
};
Topics.pushUnreadCount = function(uids, callback) {
console.log('uids', uids);
if (uids == 0) throw new Error();
if (!uids) {
clients = websockets.getConnectedClients();
@ -410,9 +409,12 @@ var async = require('async'),
async.each(uids, function(uid, next) {
Topics.getUnreadTids(uid, 0, 19, function(err, tids) {
websockets.in('uid_' + uid).emit('event:unread.updateCount', tids.length);
next();
});
}, function(err) {
winston.error(err);
if (err) {
winston.error(err.message);
}
if (callback) {
callback();

Loading…
Cancel
Save