]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/activitypub.ts
add quarantine videos feature (#1637)
[github/Chocobozzz/PeerTube.git] / server / helpers / activitypub.ts
index eba552524d8bf347eb155b33c1b5d0407c81ef84..31c6187d108d9ea60fbc4e2607f51fffc54a557f 100644 (file)
@@ -28,12 +28,17 @@ function activityPubContextify <T> (data: T) {
         state: 'sc:Number',
         size: 'sc:Number',
         fps: 'sc:Number',
+        startTimestamp: 'sc:Number',
+        stopTimestamp: 'sc:Number',
+        position: 'sc:Number',
         commentsEnabled: 'sc:Boolean',
+        downloadEnabled: 'sc:Boolean',
         waitTranscoding: 'sc:Boolean',
         expires: 'sc:expires',
         support: 'sc:Text',
         CacheFile: 'pt:CacheFile',
-        Infohash: 'pt:Infohash'
+        Infohash: 'pt:Infohash',
+        originallyPublishedAt: 'sc:DateTime'
       },
       {
         likes: {
@@ -44,6 +49,10 @@ function activityPubContextify <T> (data: T) {
           '@id': 'as:dislikes',
           '@type': '@id'
         },
+        playlists: {
+          '@id': 'pt:playlists',
+          '@type': '@id'
+        },
         shares: {
           '@id': 'as:shares',
           '@type': '@id'
@@ -65,7 +74,7 @@ async function activityPubCollectionPagination (baseUrl: string, handler: Activi
 
     return {
       id: baseUrl,
-      type: 'OrderedCollection',
+      type: 'OrderedCollectionPage',
       totalItems: result.total,
       first: baseUrl + '?page=1'
     }