aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts1
-rw-r--r--server/models/abuse/abuse-query-builder.ts5
2 files changed, 5 insertions, 1 deletions
diff --git a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts
index 08cf297cc..8781c16f5 100644
--- a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts
+++ b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts
@@ -171,6 +171,7 @@ export class AbuseListTableComponent extends RestTable implements OnInit {
171 171
172 isLocalAbuse (abuse: AdminAbuse) { 172 isLocalAbuse (abuse: AdminAbuse) {
173 if (this.viewType === 'user') return true 173 if (this.viewType === 'user') return true
174 if (!abuse.reporterAccount) return false
174 175
175 return Actor.IS_LOCAL(abuse.reporterAccount.host) 176 return Actor.IS_LOCAL(abuse.reporterAccount.host)
176 } 177 }
diff --git a/server/models/abuse/abuse-query-builder.ts b/server/models/abuse/abuse-query-builder.ts
index 532459144..025e6ba55 100644
--- a/server/models/abuse/abuse-query-builder.ts
+++ b/server/models/abuse/abuse-query-builder.ts
@@ -48,7 +48,10 @@ function buildAbuseListQuery (options: BuildAbusesQueryOptions, type: 'count' |
48 ] 48 ]
49 49
50 if (options.serverAccountId || options.userAccountId) { 50 if (options.serverAccountId || options.userAccountId) {
51 whereAnd.push('"abuse"."reporterAccountId" NOT IN (' + buildBlockedAccountSQL([ options.serverAccountId, options.userAccountId ]) + ')') 51 whereAnd.push(
52 '"abuse"."reporterAccountId" IS NULL OR ' +
53 '"abuse"."reporterAccountId" NOT IN (' + buildBlockedAccountSQL([ options.serverAccountId, options.userAccountId ]) + ')'
54 )
52 } 55 }
53 56
54 if (options.reporterAccountId) { 57 if (options.reporterAccountId) {