From fd3353bcfec2caf0a5226147afd162750dacb3e9 Mon Sep 17 00:00:00 2001 From: Chocolate Pie <106949016+chocolate-pie@users.noreply.github.com> Date: Tue, 18 Jul 2023 14:28:07 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=E3=83=AA=E3=83=A2=E3=83=BC=E3=83=88?= =?UTF-8?q?=E3=82=B5=E3=83=BC=E3=83=90=E3=83=BC=E3=81=8B=E3=82=89=E8=BB=A2?= =?UTF-8?q?=E9=80=81=E3=81=95=E3=82=8C=E3=81=9F=E9=80=9A=E5=A0=B1=E3=82=82?= =?UTF-8?q?=E5=AF=BE=E8=B1=A1=E3=81=AB=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/activitypub/ApInboxService.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/core/activitypub/ApInboxService.ts b/packages/backend/src/core/activitypub/ApInboxService.ts index 8d5f4883e4..1bdae1ded8 100644 --- a/packages/backend/src/core/activitypub/ApInboxService.ts +++ b/packages/backend/src/core/activitypub/ApInboxService.ts @@ -512,7 +512,7 @@ export class ApInboxService { }); if (users.length < 1) return 'skip'; - await this.abuseUserReportsRepository.insert({ + const report = await this.abuseUserReportsRepository.insert({ id: this.idService.genId(), createdAt: new Date(), targetUserId: users[0].id, @@ -520,7 +520,9 @@ export class ApInboxService { reporterId: actor.id, reporterHost: actor.host, comment: `${activity.content}\n${JSON.stringify(uris, null, 2)}`, - }); + }).then(x => this.abuseUserReportsRepository.findOneByOrFail(x.identifiers[0])); + + this.queueService.createReportAbuseJob(report); return 'ok'; }