mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 10:46:14 +01:00
* feat: debug no-new-posts * feat: add test for user delete * fix: timeout for flag test * feat: shorter
This commit is contained in:
committed by
GitHub
parent
e76214a25c
commit
3c32d8600f
@@ -29,7 +29,8 @@ module.exports = function (Categories) {
|
||||
return await db.sortedSetAdd('cid:' + cid + ':recent_tids', Date.now(), tid);
|
||||
}
|
||||
const data = await db.getSortedSetRangeWithScores('cid:' + cid + ':recent_tids', 0, count - numRecentReplies);
|
||||
if (data.length) {
|
||||
const shouldRemove = !(data.length === 1 && count === 1 && data[0].value === String(tid));
|
||||
if (data.length && shouldRemove) {
|
||||
await db.sortedSetsRemoveRangeByScore(['cid:' + cid + ':recent_tids'], '-inf', data[data.length - 1].score);
|
||||
}
|
||||
await db.sortedSetAdd('cid:' + cid + ':recent_tids', Date.now(), tid);
|
||||
|
||||
Reference in New Issue
Block a user