From 84845992947365412733d056b9a9fe6ff15bd53f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 17 Dec 2021 15:21:24 +0100 Subject: Fix subscriptions --- server/models/video/sql/videos-id-list-query-builder.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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\'' + ' )' -- cgit v1.2.3