X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Factivitypub%2Factor-follow.ts;h=c35c712ed94373420a946aa25cb71286bc0ef5a1;hb=ca309a9f6492f340295fee010ffa6dcc63fd76b4;hp=4cba05e95f0f67a986257dd2e3ec22f875504e3c;hpb=234b535dacdeacfacd7ac5601e53b6b7d923ca00;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/activitypub/actor-follow.ts b/server/models/activitypub/actor-follow.ts index 4cba05e95..c35c712ed 100644 --- a/server/models/activitypub/actor-follow.ts +++ b/server/models/activitypub/actor-follow.ts @@ -190,14 +190,21 @@ export class ActorFollowModel extends Model { } 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,