mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 09:06:15 +01:00
fix: regression that caused S2S calls to topics to return with a 404
This commit is contained in:
@@ -64,7 +64,7 @@ Actors.note = async function (req, res) {
|
|||||||
|
|
||||||
Actors.topic = async function (req, res) {
|
Actors.topic = async function (req, res) {
|
||||||
// When queried, a topic more or less returns the main pid's note representation
|
// 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 { mainPid, slug } = await topics.getTopicFields(req.params.tid, ['mainPid', 'slug']);
|
||||||
const post = (await posts.getPostSummaryByPids([mainPid], req.uid, { stripTags: false })).pop();
|
const post = (await posts.getPostSummaryByPids([mainPid], req.uid, { stripTags: false })).pop();
|
||||||
if (!allowed || !post) {
|
if (!allowed || !post) {
|
||||||
|
|||||||
Reference in New Issue
Block a user