From c986175d68a18e96fbd41537a05c7796a2c64f38 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 22 Nov 2017 10:29:55 +0100 Subject: Fetch outbox to grab old activities --- server/helpers/activitypub.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'server/helpers') diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts index 04d85b8e6..fb4a43a01 100644 --- a/server/helpers/activitypub.ts +++ b/server/helpers/activitypub.ts @@ -46,14 +46,16 @@ function activityPubCollectionPagination (url: string, page: number, result: Res orderedItems: result.data } - const obj = { - id: url, - type: 'OrderedCollection', - totalItems: result.total, - orderedItems: orderedCollectionPagination + if (page === 1) { + return activityPubContextify({ + id: url, + type: 'OrderedCollection', + totalItems: result.total, + first: orderedCollectionPagination + }) } - return activityPubContextify(obj) + return orderedCollectionPagination } function buildSignedActivity (byAccount: AccountInstance, data: Object) { -- cgit v1.2.3