From 16b90975941b78d01d7202d441bf731a10048c16 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 23 Nov 2017 16:55:13 +0100 Subject: Fetch video likes/dislikes too --- server/helpers/activitypub.ts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'server/helpers') diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts index 54c460200..1ea6422ca 100644 --- a/server/helpers/activitypub.ts +++ b/server/helpers/activitypub.ts @@ -24,6 +24,14 @@ function activityPubContextify (data: T) { }) } +function activityPubCollection (results: any[]) { + return { + type: 'OrderedCollection', + totalItems: results.length, + orderedItems: results + } +} + function activityPubCollectionPagination (url: string, page: any, result: ResultList) { let next: string let prev: string @@ -74,5 +82,6 @@ function buildSignedActivity (byAccount: AccountInstance, data: Object) { export { activityPubContextify, activityPubCollectionPagination, + activityPubCollection, buildSignedActivity } -- cgit v1.2.3