mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-24 05:10:38 +01:00
Merge branch 'develop' into activitypub
This commit is contained in:
@@ -170,8 +170,7 @@ module.exports = function (Topics) {
|
||||
|
||||
Topics.reply = async function (data) {
|
||||
data = await plugins.hooks.fire('filter:topic.reply', data);
|
||||
const { tid } = data;
|
||||
const { uid } = data;
|
||||
const { tid, uid } = data;
|
||||
|
||||
const [topicData, isAdmin] = await Promise.all([
|
||||
Topics.getTopicData(tid),
|
||||
|
||||
@@ -199,7 +199,7 @@ module.exports = function (Topics) {
|
||||
}
|
||||
const cids = params.cid || await getWatchedTrackedCids(params.uid);
|
||||
const keys = cids.map(cid => `cid:${cid}:tids:lastposttime`);
|
||||
return await db.getSortedSetRevRangeByScoreWithScores(keys, 0, -1, '+inf', params.cutoff);
|
||||
return await db.getSortedSetRevRangeByScoreWithScores(keys, 0, 200, '+inf', params.cutoff);
|
||||
}
|
||||
|
||||
async function getWatchedTrackedCids(uid) {
|
||||
@@ -218,7 +218,7 @@ module.exports = function (Topics) {
|
||||
params.cid.map(cid => `cid:${cid}:tids:lastposttime`) :
|
||||
'topics:recent';
|
||||
|
||||
const recentTopicData = await db.getSortedSetRevRangeByScoreWithScores(keys, 0, -1, '+inf', params.cutoff);
|
||||
const recentTopicData = await db.getSortedSetRevRangeByScoreWithScores(keys, 0, 200, '+inf', params.cutoff);
|
||||
const isFollowed = await db.isSortedSetMembers(`uid:${params.uid}:followed_tids`, recentTopicData.map(t => t.tid));
|
||||
return recentTopicData.filter((t, i) => isFollowed[i]);
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@
|
||||
{{{ end }}}
|
||||
</button>
|
||||
|
||||
<button class="btn btn-ghost btn-sm d-flex gap-2 align-items-center">
|
||||
<button class="btn btn-ghost btn-sm d-flex gap-2 align-items-center purge">
|
||||
<i class="fa fa-fw fa-trash text-danger"></i> [[admin/manage/categories:purge]]
|
||||
</button>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user