From ca309a9f6492f340295fee010ffa6dcc63fd76b4 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 9 Jan 2018 17:22:26 +0100 Subject: Fix aot build --- server/models/activitypub/actor-follow.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'server') 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, -- cgit v1.2.3