From 91c79506b57a0b6c3aed13808c3dc2169a100fd3 Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Mon, 24 Jul 2017 12:17:55 -0400 Subject: [PATCH] add tagwhitelist to topic api --- src/topics.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/topics.js b/src/topics.js index 8dd5df0c13..1434d86dc0 100644 --- a/src/topics.js +++ b/src/topics.js @@ -175,7 +175,8 @@ Topics.getTopicWithPosts = function (topicData, set, uid, start, stop, reverse, function (next) { async.parallel({ posts: async.apply(getMainPostAndReplies, topicData, set, uid, start, stop, reverse), - category: async.apply(Topics.getCategoryData, topicData.tid), + category: async.apply(categories.getCategoryData, topicData.cid), + tagWhitelist: async.apply(categories.getTagWhitelist, [topicData.cid]), threadTools: async.apply(plugins.fireHook, 'filter:topic.thread_tools', { topic: topicData, uid: uid, tools: [] }), isFollowing: async.apply(Topics.isFollowing, [topicData.tid], uid), isIgnoring: async.apply(Topics.isIgnoring, [topicData.tid], uid), @@ -198,6 +199,7 @@ Topics.getTopicWithPosts = function (topicData, set, uid, start, stop, reverse, function (results, next) { topicData.posts = results.posts; topicData.category = results.category; + topicData.tagWhitelist = results.tagWhitelist[0]; topicData.thread_tools = results.threadTools.tools; topicData.isFollowing = results.isFollowing[0]; topicData.isNotFollowing = !results.isFollowing[0] && !results.isIgnoring[0];