Skip to content

Node.js based forum software built for the modern web

fix: regression that caused S2S calls to topics to return with a 404

Julian Lam5a2d17dfd183
diff --git a/src/controllers/activitypub/actors.js b/src/controllers/activitypub/actors.js
index 5426a464a8..4e934be038 100644
--- a/src/controllers/activitypub/actors.js
+++ b/src/controllers/activitypub/actors.js
@@ -64,7 +64,7 @@ Actors.note = async function (req, res) {
Actors.topic = async function (req, res) {
// When queried, a topic more or less returns the main pid's note representation
- const allowed = utils.isNumber(req.params.pid) && await privileges.topics.can('topics:read', req.params.tid, activitypub._constants.uid);
+ const allowed = await privileges.topics.can('topics:read', req.params.tid, activitypub._constants.uid);
const { mainPid, slug } = await topics.getTopicFields(req.params.tid, ['mainPid', 'slug']);
const post = (await posts.getPostSummaryByPids([mainPid], req.uid, { stripTags: false })).pop();
if (!allowed || !post) {