]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/activitypub/actor-follow.ts
Fix aot build
[github/Chocobozzz/PeerTube.git] / server / models / activitypub / actor-follow.ts
index 4cba05e95f0f67a986257dd2e3ec22f875504e3c..c35c712ed94373420a946aa25cb71286bc0ef5a1 100644 (file)
@@ -190,14 +190,21 @@ export class ActorFollowModel extends Model<ActorFollowModel> {
   }
 
   static listAcceptedFollowerSharedInboxUrls (actorIds: number[], t: Sequelize.Transaction) {
-    return ActorFollowModel.createListAcceptedFollowForApiQuery('followers', actorIds, t, undefined, undefined, 'sharedInboxUrl')
+    return ActorFollowModel.createListAcceptedFollowForApiQuery(
+      'DISTINCT(followers)',
+      actorIds,
+      t,
+      undefined,
+      undefined,
+      'sharedInboxUrl'
+    )
   }
 
   static listAcceptedFollowingUrlsForApi (actorIds: number[], t: Sequelize.Transaction, start?: number, count?: number) {
     return ActorFollowModel.createListAcceptedFollowForApiQuery('following', actorIds, t, start, count)
   }
 
-  private static async createListAcceptedFollowForApiQuery (type: 'followers' | 'following',
+  private static async createListAcceptedFollowForApiQuery (type: 'followers' | 'following' | 'DISTINCT(followers)',
                                        actorIds: number[],
                                        t: Sequelize.Transaction,
                                        start?: number,