Node.js based forum software built for the modern web
fix: send topic title in context object
Julian Lam05cdb7d9203e
diff --git a/src/controllers/activitypub/actors.js b/src/controllers/activitypub/actors.jsindex 5a7f6d8453..4391f03cee 100644--- a/src/controllers/activitypub/actors.js+++ b/src/controllers/activitypub/actors.js@@ -69,7 +69,7 @@ Actors.topic = async function (req, res, next) {}let page = parseInt(req.query.page, 10);- const { cid, mainPid, slug, postcount } = await topics.getTopicFields(req.params.tid, ['cid', 'mainPid', 'slug', 'postcount']);+ const { cid, titleRaw: name, mainPid, slug, postcount } = await topics.getTopicFields(req.params.tid, ['cid', 'title', 'mainPid', 'slug', 'postcount']);const pageCount = Math.max(1, Math.ceil(postcount / meta.config.postsPerPage));let items;let paginate = true;@@ -99,6 +99,7 @@ Actors.topic = async function (req, res, next) {'@context': 'https://www.w3.org/ns/activitystreams',id: `${nconf.get('url')}/topic/${req.params.tid}${paginate && page ? `?page=${page}` : ''}`,url: `${nconf.get('url')}/topic/${slug}`,+ name,type: paginate && items ? 'OrderedCollectionPage' : 'OrderedCollection',audience: `${nconf.get('url')}/category/${cid}`,totalItems: postcount,