send array of posts

This commit is contained in:
barisusakli
2014-10-09 18:12:40 -04:00
parent 4190b3c41c
commit 0d95089bfe
3 changed files with 7 additions and 2 deletions

View File

@@ -38,7 +38,7 @@ SocketTopics.post = function(socket, data, callback) {
}
callback(null, result.topicData);
socket.emit('event:new_post', {posts: result.postData});
socket.emit('event:new_post', {posts: [result.postData]});
socket.emit('event:new_topic', result.topicData);
var uids = websockets.getConnectedClients();