Skip to content

Node.js based forum software built for the modern web

refactor: use getSortedSetMembers

Barış Soner Uşaklı7d484fc0ad0e
diff --git a/src/topics/unread.js b/src/topics/unread.js
index 6c82a5660d..f07640875f 100644
--- a/src/topics/unread.js
+++ b/src/topics/unread.js
@@ -177,7 +177,7 @@ module.exports = function (Topics) {
}
async function getFollowedTids(params) {
- let tids = (await db.getSortedSetsMembers(['uid:' + params.uid + ':followed_tids']))[0];
+ let tids = await db.getSortedSetMembers('uid:' + params.uid + ':followed_tids');
const filterCids = params.cid && params.cid.map(cid => parseInt(cid, 10));
if (filterCids) {
const topicData = await Topics.getTopicsFields(tids, ['tid', 'cid']);