Fix: 無限ループを抑制
This commit is contained in:
parent
3b1d9e0285
commit
63359f5fc4
|
@ -76,16 +76,16 @@ export class ReportAbuseProcessorService {
|
||||||
const isReportContentPatternMatched = resolver.reportContentPattern ? new RE2(resolver.reportContentPattern).test(job.data.comment) : true;
|
const isReportContentPatternMatched = resolver.reportContentPattern ? new RE2(resolver.reportContentPattern).test(job.data.comment) : true;
|
||||||
|
|
||||||
if (isTargetUserPatternMatched && isReporterPatternMatched && isReportContentPatternMatched) {
|
if (isTargetUserPatternMatched && isReporterPatternMatched && isReportContentPatternMatched) {
|
||||||
if (resolver.forward && job.data.targetUserHost !== null) {
|
if (resolver.forward && job.data.targetUserHost !== null && job.data.reporterHost === null) {
|
||||||
this.queueService.deliver(actor, this.apRendererService.addContext(this.apRendererService.renderFlag(actor, targetUser.uri!, job.data.comment)), targetUser.inbox, false);
|
this.queueService.deliver(actor, this.apRendererService.addContext(this.apRendererService.renderFlag(actor, targetUser.uri!, job.data.comment)), targetUser.inbox, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.abuseUserReportsRepository.update(job.data.id, {
|
await this.abuseUserReportsRepository.update(job.data.id, {
|
||||||
resolved: true,
|
resolved: true,
|
||||||
assigneeId: actor.id,
|
assigneeId: actor.id,
|
||||||
forwarded: resolver.forward && job.data.targetUserHost !== null,
|
forwarded: resolver.forward && job.data.targetUserHost !== null && job.data.reporterHost === null,
|
||||||
});
|
});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue