Skip to content

Node.js based forum software built for the modern web

fix: bug where newly create cids were not responding via webfinger, 404 on webfinger errors, not 400

Julian Lamc17809e450e2
diff --git a/src/categories/create.js b/src/categories/create.js
index 60923d28b6..f2e8f8811d 100644
--- a/src/categories/create.js
+++ b/src/categories/create.js
@@ -92,6 +92,7 @@ module.exports = function (Categories) {
['categories:cid', category.order, category.cid],
[`cid:${parentCid}:children`, category.order, category.cid],
['categories:name', 0, `${data.name.slice(0, 200).toLowerCase()}:${category.cid}`],
+ ['categoryhandle:cid', cid, handle],
]);
await privileges.categories.give(result.defaultPrivileges, category.cid, ['registered-users', 'fediverse']);
diff --git a/src/controllers/well-known.js b/src/controllers/well-known.js
index 7df8d543fc..0a9937f036 100644
--- a/src/controllers/well-known.js
+++ b/src/controllers/well-known.js
@@ -40,7 +40,7 @@ Controller.webfinger = async (req, res) => {
res.status(200).json(response);
} catch (e) {
- res.sendStatus(400);
+ res.sendStatus(404);
}
};