mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: wrong property name for OrderedCollection items
This commit is contained in:
@@ -30,11 +30,15 @@ Contexts.get = async (uid, id) => {
|
||||
|
||||
Contexts.getItems = async (uid, id, root = true) => {
|
||||
winston.verbose(`[activitypub/context] Retrieving context ${id}`);
|
||||
let { type, items, first, next } = await activitypub.get('uid', uid, id);
|
||||
let { type, items, orderedItems, first, next } = await activitypub.get('uid', uid, id);
|
||||
if (!acceptableTypes.includes(type)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (type.startsWith('Ordered')) {
|
||||
items = orderedItems;
|
||||
}
|
||||
|
||||
if (items) {
|
||||
items = (await Promise.all(items.map(async (item) => {
|
||||
const { type, id } = await activitypub.helpers.resolveLocalId(item);
|
||||
|
||||
@@ -107,7 +107,7 @@ Actors.topic = async function (req, res, next) {
|
||||
};
|
||||
|
||||
if (items) {
|
||||
object.items = items;
|
||||
object.orderedItems = items;
|
||||
|
||||
if (paginate) {
|
||||
object.partOf = `${nconf.get('url')}/topic/${req.params.tid}`;
|
||||
|
||||
Reference in New Issue
Block a user