mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46: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) => {
|
Contexts.getItems = async (uid, id, root = true) => {
|
||||||
winston.verbose(`[activitypub/context] Retrieving context ${id}`);
|
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)) {
|
if (!acceptableTypes.includes(type)) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (type.startsWith('Ordered')) {
|
||||||
|
items = orderedItems;
|
||||||
|
}
|
||||||
|
|
||||||
if (items) {
|
if (items) {
|
||||||
items = (await Promise.all(items.map(async (item) => {
|
items = (await Promise.all(items.map(async (item) => {
|
||||||
const { type, id } = await activitypub.helpers.resolveLocalId(item);
|
const { type, id } = await activitypub.helpers.resolveLocalId(item);
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ Actors.topic = async function (req, res, next) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (items) {
|
if (items) {
|
||||||
object.items = items;
|
object.orderedItems = items;
|
||||||
|
|
||||||
if (paginate) {
|
if (paginate) {
|
||||||
object.partOf = `${nconf.get('url')}/topic/${req.params.tid}`;
|
object.partOf = `${nconf.get('url')}/topic/${req.params.tid}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user