Fix subscriptions

This commit is contained in:
Chocobozzz 2021-12-17 15:21:24 +01:00
parent 709565486f
commit 8484599294
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 3 additions and 2 deletions

View File

@ -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\'' +
' )'