Fix: リモートサーバーから転送された通報も対象に追加

This commit is contained in:
Chocolate Pie 2023-07-18 14:28:07 +09:00
parent 36b841215c
commit fd3353bcfe
1 changed files with 4 additions and 2 deletions

View File

@ -512,7 +512,7 @@ export class ApInboxService {
}); });
if (users.length < 1) return 'skip'; if (users.length < 1) return 'skip';
await this.abuseUserReportsRepository.insert({ const report = await this.abuseUserReportsRepository.insert({
id: this.idService.genId(), id: this.idService.genId(),
createdAt: new Date(), createdAt: new Date(),
targetUserId: users[0].id, targetUserId: users[0].id,
@ -520,7 +520,9 @@ export class ApInboxService {
reporterId: actor.id, reporterId: actor.id,
reporterHost: actor.host, reporterHost: actor.host,
comment: `${activity.content}\n${JSON.stringify(uris, null, 2)}`, comment: `${activity.content}\n${JSON.stringify(uris, null, 2)}`,
}); }).then(x => this.abuseUserReportsRepository.findOneByOrFail(x.identifiers[0]));
this.queueService.createReportAbuseJob(report);
return 'ok'; return 'ok';
} }