diff --git a/src/controllers/category.js b/src/controllers/category.js index 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(); }