]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/activitypub/client.ts
Add playlist rest tests
[github/Chocobozzz/PeerTube.git] / server / controllers / activitypub / client.ts
index 59e6c8e9f0369387b455d8d279ddba33211816b9..f616047b03b3b381914bfad90716695e6d30c919 100644 (file)
@@ -320,7 +320,10 @@ async function videoRedundancyController (req: express.Request, res: express.Res
 async function videoPlaylistController (req: express.Request, res: express.Response) {
   const playlist: VideoPlaylistModel = res.locals.videoPlaylist
 
-  const json = await playlist.toActivityPubObject()
+  // We need more attributes
+  playlist.OwnerAccount = await AccountModel.load(playlist.ownerAccountId)
+
+  const json = await playlist.toActivityPubObject(req.query.page, null)
   const audience = getAudience(playlist.OwnerAccount.Actor, playlist.privacy === VideoPlaylistPrivacy.PUBLIC)
   const object = audiencify(json, audience)