From aa1ff61c0639bf6d721cbb8601b4c20d1a5a634c Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 20 Mar 2025 14:48:09 -0400 Subject: [PATCH] fix: allow category controller to respond also by remote category id --- src/controllers/category.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(); }