Fix abuse crash on deleted reporter account
This commit is contained in:
parent
efd4ff5fbc
commit
82b9a1005c
2 changed files with 5 additions and 1 deletions
|
@ -171,6 +171,7 @@ export class AbuseListTableComponent extends RestTable implements OnInit {
|
|||
|
||||
isLocalAbuse (abuse: AdminAbuse) {
|
||||
if (this.viewType === 'user') return true
|
||||
if (!abuse.reporterAccount) return false
|
||||
|
||||
return Actor.IS_LOCAL(abuse.reporterAccount.host)
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue