aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-query-builder.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video-query-builder.ts')
-rw-r--r--server/models/video/video-query-builder.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/models/video/video-query-builder.ts b/server/models/video/video-query-builder.ts
index 455f9f30f..6211c9e56 100644
--- a/server/models/video/video-query-builder.ts
+++ b/server/models/video/video-query-builder.ts
@@ -135,12 +135,14 @@ function buildListQuery (model: typeof Model, options: BuildVideosQueryOptions)
135 ' EXISTS (' + 135 ' EXISTS (' +
136 ' SELECT 1 FROM "videoShare" ' + 136 ' SELECT 1 FROM "videoShare" ' +
137 ' INNER JOIN "actorFollow" "actorFollowShare" ON "actorFollowShare"."targetActorId" = "videoShare"."actorId" ' + 137 ' INNER JOIN "actorFollow" "actorFollowShare" ON "actorFollowShare"."targetActorId" = "videoShare"."actorId" ' +
138 ' AND "actorFollowShare"."actorId" = :followerActorId WHERE "videoShare"."videoId" = "video"."id"' + 138 ' AND "actorFollowShare"."actorId" = :followerActorId AND "actorFollowShare"."state" = \'accepted\' ' +
139 ' WHERE "videoShare"."videoId" = "video"."id"' +
139 ' )' + 140 ' )' +
140 ' OR' + 141 ' OR' +
141 ' EXISTS (' + 142 ' EXISTS (' +
142 ' SELECT 1 from "actorFollow" ' + 143 ' SELECT 1 from "actorFollow" ' +
143 ' WHERE "actorFollow"."targetActorId" = "videoChannel"."actorId" AND "actorFollow"."actorId" = :followerActorId' + 144 ' WHERE "actorFollow"."targetActorId" = "videoChannel"."actorId" AND "actorFollow"."actorId" = :followerActorId ' +
145 ' AND "actorFollow"."state" = \'accepted\'' +
144 ' )' 146 ' )'
145 147
146 if (options.includeLocalVideos) { 148 if (options.includeLocalVideos) {