]> 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..025e6ba5532320e01d4bd2420265af413037e007 100644 (file)
@@ -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) {