From 109f42321191825c11d7c0ae8310eaedd153e39a Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 3 May 2024 14:21:46 -0400 Subject: [PATCH] fix: partOf and type --- src/controllers/activitypub/actors.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/activitypub/actors.js b/src/controllers/activitypub/actors.js index 7a1809a2fa..5a7f6d8453 100644 --- a/src/controllers/activitypub/actors.js +++ b/src/controllers/activitypub/actors.js @@ -99,16 +99,16 @@ 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}`, - type: items ? 'OrderedCollectionPage' : 'OrderedCollection', + type: paginate && items ? 'OrderedCollectionPage' : 'OrderedCollection', audience: `${nconf.get('url')}/category/${cid}`, totalItems: postcount, }; if (items) { - object.partOf = `${nconf.get('url')}/topic/${req.params.tid}`; object.items = items; if (paginate) { + object.partOf = `${nconf.get('url')}/topic/${req.params.tid}`; object.next = page < pageCount ? `${nconf.get('url')}/topic/${req.params.tid}?page=${page + 1}` : null; object.prev = page > 1 ? `${nconf.get('url')}/topic/${req.params.tid}?page=${page - 1}` : null; }