Merge branch 'master' of github.com:psychobunny/node-forum

Conflicts:
	src/websockets.js
v1.18.x
Julian Lam 12 years ago
commit bafac00232

@ -266,9 +266,16 @@ var SocketIO = require('socket.io').listen(global.server,{log:false}),
user.getUserField(uid, 'username', function(username) {
var finalMessage = username + ' says : ' + msg;
for(var x=0;x>numSockets;x++) {
userSockets[touid][x].emit('chatMessage', {fromuid:uid, username:username, message:finalMessage});
}
notifications.create(finalMessage, 5, null, 'notification_'+new Date().getTime(), function(nid) {
notifications.push(nid, [touid], function(success) {
console.log(success);
});
});
});
}
});

Loading…
Cancel
Save