Node.js based forum software built for the modern web
fix: translate category data on /world
Julian Lam4d86f3164984
diff --git a/src/controllers/activitypub/topics.js b/src/controllers/activitypub/topics.jsindex 28a015bfe1..0b44b5cc15 100644--- a/src/controllers/activitypub/topics.js+++ b/src/controllers/activitypub/topics.js@@ -18,7 +18,7 @@ controller.list = async function (req, res) {return helpers.redirect(res, '/world?local=1', false);}- const { topicsPerPage } = await user.getSettings(req.uid);+ const { topicsPerPage, userLang } = await user.getSettings(req.uid);let { page, after } = req.query;page = parseInt(page, 10) || 1;let start = Math.max(0, (page - 1) * topicsPerPage);@@ -46,6 +46,7 @@ controller.list = async function (req, res) {thumbsOnly: 1,};const data = await categories.getCategoryById(cidQuery);+ await helpers.translateCategoryData([data], userLang);delete data.children;data.sort = req.query.sort;data.privileges = userPrivileges;