ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix comments SQL query
Chocobozzz085311a90a95
diff --git a/server/core/models/shared/sql/actor-helpers.ts b/server/core/models/shared/sql/actor-helpers.tsindex 7ebf6a9a12..9488b63b9a 100644--- a/server/core/models/shared/sql/actor-helpers.ts+++ b/server/core/models/shared/sql/actor-helpers.ts@@ -56,7 +56,7 @@ export function getAccountJoin (options: {? getActorJoin({ base: `${base}Account->`, on: `"${base}Account"."actorId"`, includeAvatars }): ''- return `LEFT JOIN "account" "${base}Account" ON "${base}Account"."id" = ${on} ` ++ return ` LEFT JOIN "account" "${base}Account" ON "${base}Account"."id" = ${on} ` +actorJoin}@@ -66,7 +66,7 @@ export function getAvatarsJoin (options: {}) {const { base = '', on } = options- return `LEFT JOIN "actorImage" "${base}Avatars" ` ++ return ` LEFT JOIN "actorImage" "${base}Avatars" ` +`ON "${base}Avatars"."actorId" = ${on} ` +`AND "${base}Avatars"."type" = ${ActorImageType.AVATAR} `}diff --git a/server/core/models/video/sql/comment/video-comment-list-query-builder.ts b/server/core/models/video/sql/comment/video-comment-list-query-builder.tsindex 4ca2e8ca32..dfad1d22f9 100644--- a/server/core/models/video/sql/comment/video-comment-list-query-builder.ts+++ b/server/core/models/video/sql/comment/video-comment-list-query-builder.ts@@ -301,10 +301,10 @@ export class VideoCommentListQueryBuilder extends AbstractListQuery {private buildAutomaticTagsJoin () {if (this.builtAutomaticTagsJoin) return- this.subQueryJoin += 'LEFT JOIN (' ++ this.subQueryJoin += ' LEFT JOIN (' +'"commentAutomaticTag" AS "CommentAutomaticTags" INNER JOIN "automaticTag" AS "CommentAutomaticTags->AutomaticTag" ' +'ON "CommentAutomaticTags->AutomaticTag"."id" = "CommentAutomaticTags"."automaticTagId" ' +- ') ON "VideoCommentModel"."id" = "CommentAutomaticTags"."commentId" AND "CommentAutomaticTags"."accountId" = :autoTagOfAccountId'+ ') ON "VideoCommentModel"."id" = "CommentAutomaticTags"."commentId" AND "CommentAutomaticTags"."accountId" = :autoTagOfAccountId 'this.replacements.autoTagOfAccountId = this.options.autoTagOfAccountIdthis.builtAutomaticTagsJoin = true