aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-22 10:29:55 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:53 +0100
commitc986175d68a18e96fbd41537a05c7796a2c64f38 (patch)
treee8a8a02abb57e637451afbf3b1b0e7a0dbd4206c /server/helpers
parente71bcc0f4b31ecfd84a786411febfc6d18a85258 (diff)
downloadPeerTube-c986175d68a18e96fbd41537a05c7796a2c64f38.tar.gz
PeerTube-c986175d68a18e96fbd41537a05c7796a2c64f38.tar.zst
PeerTube-c986175d68a18e96fbd41537a05c7796a2c64f38.zip
Fetch outbox to grab old activities
Diffstat (limited to 'server/helpers')
-rw-r--r--server/helpers/activitypub.ts14
1 files changed, 8 insertions, 6 deletions
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
46 orderedItems: result.data 46 orderedItems: result.data
47 } 47 }
48 48
49 const obj = { 49 if (page === 1) {
50 id: url, 50 return activityPubContextify({
51 type: 'OrderedCollection', 51 id: url,
52 totalItems: result.total, 52 type: 'OrderedCollection',
53 orderedItems: orderedCollectionPagination 53 totalItems: result.total,
54 first: orderedCollectionPagination
55 })
54 } 56 }
55 57
56 return activityPubContextify(obj) 58 return orderedCollectionPagination
57} 59}
58 60
59function buildSignedActivity (byAccount: AccountInstance, data: Object) { 61function buildSignedActivity (byAccount: AccountInstance, data: Object) {