From 68eba7285547adb18ccc7d0ed560ffb010a7b932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 24 Feb 2026 09:29:48 -0500 Subject: [PATCH] fix: add missing timestamp allow add tag to query param to recent/top/popular feeds --- src/routes/feeds.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/routes/feeds.js b/src/routes/feeds.js index 0e4c066673..31ee634850 100644 --- a/src/routes/feeds.js +++ b/src/routes/feeds.js @@ -175,7 +175,7 @@ async function generateForTopics(req, res, next) { description: 'A list of topics that have been created recently', feed_url: '/topics.rss', useMainPost: true, - }, 'topics:tid', res); + }, 'topics:tid', res, 'timestamp'); } async function generateForRecent(req, res, next) { @@ -228,14 +228,15 @@ async function generateSorted(options, req, res, next) { stop: 19, term: term, sort: options.sort, + tags: req.query.tag, }; - const { cid } = req.query; + let { cid } = req.query; if (cid) { - if (!await privileges.categories.can('topics:read', cid, uid)) { - return controllerHelpers.notAllowed(req, res); + if (!Array.isArray(cid)) { + cid = [cid]; } - params.cids = [cid]; + params.cids = await privileges.categories.filterCids('topics:read', cid, uid); } const result = await topics.getSortedTopics(params); @@ -399,7 +400,7 @@ async function generateForUserTopics(req, res, next) { description: `A list of topics that are posted by ${userData.username}`, feed_url: `/user/${userslug}/topics.rss`, site_url: `/user/${userslug}/topics`, - }, `uid:${userData.uid}:topics`, res); + }, `uid:${userData.uid}:topics`, res, 'timestamp'); } async function generateForTag(req, res) { @@ -421,7 +422,7 @@ async function generateForTag(req, res) { site_url: `/tags/${tag}`, start: start, stop: stop, - }, set, res); + }, set, res, 'timestamp'); } async function getUidFromToken(req) {