derpy globals to get notification pushing working for sockets on new notification event

This commit is contained in:
Julian Lam
2013-05-23 15:53:55 -04:00
parent d0646ba98f
commit 2a829a0618
3 changed files with 7 additions and 1 deletions

View File

@@ -55,6 +55,7 @@ var config = require('../config.js'),
(function(uid) {
Notifications.remove_by_uniqueId(notif_data.uniqueId, uid, function() {
RDB.zadd('uid:' + uid + ':notifications:unread', notif_data.score, nid);
global.io.sockets.in('uid_' + uid).emit('event:new_notification');
if (callback) callback(true);
});
})(uids[x]);