From 5a2d17dfd183b2c578b6511d0e7e64eb18512dd7 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 20 Mar 2024 23:06:43 -0400 Subject: [PATCH] fix: regression that caused S2S calls to topics to return with a 404 --- src/controllers/activitypub/actors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {