diff --git a/server/models/video/sql/videos-id-list-query-builder.ts b/server/models/video/sql/videos-id-list-query-builder.ts index 879f23406..76aafb883 100644 --- a/server/models/video/sql/videos-id-list-query-builder.ts +++ b/server/models/video/sql/videos-id-list-query-builder.ts @@ -367,9 +367,10 @@ export class VideosIdListQueryBuilder extends AbstractRunQuery { ' WHERE "videoShare"."videoId" = "video"."id"' + ' )' + ' OR' + - ' EXISTS (' + // Videos published by channels we follow + ' EXISTS (' + // Videos published by channels or accounts we follow ' SELECT 1 from "actorFollow" ' + - ' WHERE "actorFollow"."targetActorId" = "videoChannel"."actorId" AND "actorFollow"."actorId" = :followerActorId ' + + ' WHERE ("actorFollow"."targetActorId" = "account"."actorId" OR "actorFollow"."targetActorId" = "videoChannel"."actorId") ' + + ' AND "actorFollow"."actorId" = :followerActorId ' + ' AND "actorFollow"."state" = \'accepted\'' + ' )'