X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fabuse%2Fabuse-query-builder.ts;h=cfc924ba4b4c495a3d2d1ae08886d161e1d5856c;hb=e722fb5923ddf11d72e48cec9788abc64327c22f;hp=53245914441c534c39a14b3022901ecdacb59097;hpb=6055411221fdbd1ae51a9f4171fc626f5ef1dd15;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/abuse/abuse-query-builder.ts b/server/models/abuse/abuse-query-builder.ts index 532459144..cfc924ba4 100644 --- a/server/models/abuse/abuse-query-builder.ts +++ b/server/models/abuse/abuse-query-builder.ts @@ -13,7 +13,7 @@ export type BuildAbusesQueryOptions = { searchReporter?: string searchReportee?: string - // video releated + // video related searchVideo?: string searchVideoChannel?: string videoIs?: AbuseVideoIs @@ -48,7 +48,10 @@ function buildAbuseListQuery (options: BuildAbusesQueryOptions, type: 'count' | ] if (options.serverAccountId || options.userAccountId) { - whereAnd.push('"abuse"."reporterAccountId" NOT IN (' + buildBlockedAccountSQL([ options.serverAccountId, options.userAccountId ]) + ')') + whereAnd.push( + '"abuse"."reporterAccountId" IS NULL OR ' + + '"abuse"."reporterAccountId" NOT IN (' + buildBlockedAccountSQL([ options.serverAccountId, options.userAccountId ]) + ')' + ) } if (options.reporterAccountId) {