moved reconnected socket call to SocketsMeta

This commit is contained in:
Julian Lam
2014-01-11 14:03:50 -05:00
parent 99af660e48
commit ee963e0c2a
3 changed files with 21 additions and 16 deletions

View File

@@ -119,21 +119,6 @@ Sockets.init = function() {
}
});
socket.on('reconnected', function() {
if (uid) {
topics.pushUnreadCount(uid);
user.pushNotifCount(uid);
}
if (process.env.NODE_ENV === 'development') {
if (uid) {
winston.info('[socket] uid ' + uid + ' (' + sessionID + ') has successfully reconnected.');
} else {
winston.info('[socket] An anonymous user (' + sessionID + ') has successfully reconnected.');
}
}
});
socket.on('*', function(payload, callback) {
// Ignore all non-api messages
if (payload.name.substr(0, 4) !== 'api:') {