]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Add missing context fields
authorChocobozzz <me@florianbigard.com>
Mon, 29 Jan 2018 10:05:52 +0000 (11:05 +0100)
committerChocobozzz <me@florianbigard.com>
Mon, 29 Jan 2018 10:05:52 +0000 (11:05 +0100)
server/helpers/activitypub.ts

index aa5485850dbfbc8c939879d8fbc966aca6486f98..eaee324eb1e5fe38102033a17847ed579f075728 100644 (file)
@@ -20,6 +20,24 @@ function activityPubContextify <T> (data: T) {
         'views': 'http://schema.org/Number',
         'size': 'http://schema.org/Number',
         'commentsEnabled': 'http://schema.org/Boolean'
+      },
+      {
+        likes: {
+          '@id': 'as:likes',
+          '@type': '@id'
+        },
+        dislikes: {
+          '@id': 'as:dislikes',
+          '@type': '@id'
+        },
+        shares: {
+          '@id': 'as:shares',
+          '@type': '@id'
+        },
+        comments: {
+          '@id': 'as:comments',
+          '@type': '@id'
+        }
       }
     ]
   })