mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-05 09:29:24 +02:00
Merge branch 'master' of github.com:psychobunny/node-forum
Conflicts: src/websockets.js
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user