From 04e0c58b84fc2e3c9e30c76ecbb611424677b980 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 21 Mar 2014 22:16:30 -0400 Subject: [PATCH] fixes realtime update of home --- src/topics/create.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/topics/create.js b/src/topics/create.js index c7c9e53572..71b941ae50 100644 --- a/src/topics/create.js +++ b/src/topics/create.js @@ -204,11 +204,18 @@ module.exports = function(Topics) { function(next) { Topics.markAsRead(tid, uid, next); }, - function(next) { + function(result, next) { Topics.pushUnreadCount(); posts.addUserInfoToPost(postData, next); }, - function(postData,next) { + function(postData, next) { + Topics.getTopicFields(tid, ['tid', 'title', 'slug'], next); + }, + function(topicData, next) { + postData.topic = topicData; + next(); + }, + function(next) { posts.getPidIndex(postData.pid, next); }, function(index, next) {