Node.js based forum software built for the modern web
fix: allow category controller to respond also by remote category id
Julian Lam0b333fb7d431
diff --git a/src/controllers/category.js b/src/controllers/category.jsindex a822022392..fe3809b825 100644--- a/src/controllers/category.js+++ b/src/controllers/category.js@@ -33,7 +33,10 @@ categoryController.get = async function (req, res, next) {if (!utils.isNumber(cid)) {const assertion = await activitypub.actors.assertGroup([cid]);- cid = await db.getObjectField('handle:cid', cid);+ if (!activitypub.helpers.isUri(cid)) {+ cid = await db.getObjectField('handle:cid', cid);+ }+if (!assertion || !cid) {return next();}