]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/abuse/abuse-query-builder.ts
Merge branch 'release/4.2.0' into develop
[github/Chocobozzz/PeerTube.git] / server / models / abuse / abuse-query-builder.ts
index 53245914441c534c39a14b3022901ecdacb59097..cfc924ba4b4c495a3d2d1ae08886d161e1d5856c 100644 (file)
@@ -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) {