aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/activitypub
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-05-25 16:21:16 +0200
committerChocobozzz <me@florianbigard.com>2018-05-25 16:21:16 +0200
commit8fffe21a7bc96d08b229293d66ddba576e609790 (patch)
tree5ebd5f5198a59084c5338ce197d7e836b39200a4 /server/models/activitypub
parente251f170b00b2014ac4e823113c6ff40e3fb1471 (diff)
downloadPeerTube-8fffe21a7bc96d08b229293d66ddba576e609790.tar.gz
PeerTube-8fffe21a7bc96d08b229293d66ddba576e609790.tar.zst
PeerTube-8fffe21a7bc96d08b229293d66ddba576e609790.zip
Refractor and optimize AP collections
Only display urls in general object, and paginate video comments, shares, likes and dislikes
Diffstat (limited to 'server/models/activitypub')
-rw-r--r--server/models/activitypub/actor-follow.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/server/models/activitypub/actor-follow.ts b/server/models/activitypub/actor-follow.ts
index c97f4cead..b8ce6de1d 100644
--- a/server/models/activitypub/actor-follow.ts
+++ b/server/models/activitypub/actor-follow.ts
@@ -335,8 +335,7 @@ export class ActorFollowModel extends Model<ActorFollowModel> {
335 tasks.push(ActorFollowModel.sequelize.query(query, options)) 335 tasks.push(ActorFollowModel.sequelize.query(query, options))
336 } 336 }
337 337
338 const [ followers, [ { total } ] ] = await 338 const [ followers, [ { total } ] ] = await Promise.all(tasks)
339 Promise.all(tasks)
340 const urls: string[] = followers.map(f => f.url) 339 const urls: string[] = followers.map(f => f.url)
341 340
342 return { 341 return {