From 1c4d78eb2dd3e4a472e07ade7e117624e32dae92 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Fri, 22 May 2015 14:37:46 -0400 Subject: [PATCH] return back data in cb similar to topics.post call --- src/socket.io/posts.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/socket.io/posts.js b/src/socket.io/posts.js index ae45e46b8e..ad3da08ddd 100644 --- a/src/socket.io/posts.js +++ b/src/socket.io/posts.js @@ -45,7 +45,7 @@ SocketPosts.reply = function(socket, data, callback) { 'downvote:disabled': parseInt(meta.config['downvote:disabled'], 10) === 1, }; - callback(); + callback(null, postData); socket.emit('event:new_post', result); @@ -305,11 +305,11 @@ SocketPosts.edit = function(socket, data, callback) { if (parseInt(result.post.deleted) !== 1) { websockets.in('topic_' + result.topic.tid).emit('event:post_edited', result); - return callback(); + return callback(null, result.post); } socket.emit('event:post_edited', result); - callback(); + callback(null, result.post); async.parallel({ admins: async.apply(groups.getMembers, 'administrators', 0, -1),