From 510e57d4142117154b8ddcdaf0997a844761b3ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 8 Jan 2018 12:22:24 -0500 Subject: [PATCH] on new topic create add to votes sorted set --- src/topics/create.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/topics/create.js b/src/topics/create.js index edb1f1b84d..bc1091bf52 100644 --- a/src/topics/create.js +++ b/src/topics/create.js @@ -64,6 +64,9 @@ module.exports = function (Topics) { 'cid:' + topicData.cid + ':uid:' + topicData.uid + ':tids', ], timestamp, topicData.tid, next); }, + function (next) { + db.sortedSetAdd('cid:' + topicData.cid + ':tids:votes', 0, topicData.tid, next); + }, function (next) { categories.updateRecentTid(topicData.cid, topicData.tid, next); },