|
|
@ -57,8 +57,10 @@ SocketTopics.post = function(socket, data, callback) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (result) {
|
|
|
|
if (result) {
|
|
|
|
|
|
|
|
|
|
|
|
index.server.sockets.in('category_' + data.category_id).emit('event:new_topic', result.topicData);
|
|
|
|
index.server.sockets.in('category_' + data.category_id).emit('event:new_topic', result.topicData);
|
|
|
|
index.server.sockets.in('recent_posts').emit('event:new_topic', result.topicData);
|
|
|
|
index.server.sockets.in('recent_posts').emit('event:new_topic', result.topicData);
|
|
|
|
|
|
|
|
index.server.sockets.in('home').emit('event:new_topic', result.topicData);
|
|
|
|
index.server.sockets.in('user/' + socket.uid).emit('event:new_post', {
|
|
|
|
index.server.sockets.in('user/' + socket.uid).emit('event:new_post', {
|
|
|
|
posts: result.postData
|
|
|
|
posts: result.postData
|
|
|
|
});
|
|
|
|
});
|
|
|
|