potential fix for duplicate chat results, started recent replies block

This commit is contained in:
psychobunny
2013-05-24 09:00:00 -04:00
parent 786baa8fe0
commit 55cb790d3c
5 changed files with 24 additions and 1 deletions

View File

@@ -263,6 +263,13 @@ var SocketIO = require('socket.io').listen(global.server, { log:false }),
notifications.mark_read(nid, uid);
});
socket.on('api:topics.getRecentReplies', function(tid) {
console.log('test');
topics.getRecentReplies(tid, function(replies) {
socket.emit('api:topics.getRecentReplies', replies);
});
});
socket.on('sendChatMessage', function(data) {
var touid = data.touid;