mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 09:06:15 +01:00
fix: only add to set if numRecentReplies>0
This commit is contained in:
@@ -33,8 +33,9 @@ module.exports = function (Categories) {
|
|||||||
await db.sortedSetsRemoveRangeByScore(['cid:' + cid + ':recent_tids'], '-inf', data[data.length - 1].score);
|
await db.sortedSetsRemoveRangeByScore(['cid:' + cid + ':recent_tids'], '-inf', data[data.length - 1].score);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (numRecentReplies > 0) {
|
||||||
await db.sortedSetAdd('cid:' + cid + ':recent_tids', Date.now(), tid);
|
await db.sortedSetAdd('cid:' + cid + ':recent_tids', Date.now(), tid);
|
||||||
|
}
|
||||||
await plugins.fireHook('action:categories.updateRecentTid', { cid: cid, tid: tid });
|
await plugins.fireHook('action:categories.updateRecentTid', { cid: cid, tid: tid });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user