From d08ea708feb40254d3ceef7150d7b30c71d6cd76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=BE=E3=81=A3=E3=81=A1=E3=82=83=E3=81=A8=E3=83=BC?= =?UTF-8?q?=E3=81=AB=E3=82=85?= <17376330+u1-liquid@users.noreply.github.com> Date: Sun, 30 Jul 2023 01:49:20 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=80=9A=E5=A0=B1=E3=81=AE=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E3=83=A1=E3=83=BC=E3=83=AB=E3=82=92=E7=99=BA=E9=80=81?= =?UTF-8?q?=E3=81=97=E3=81=AA=E3=81=84=E3=82=88=E3=81=86=E3=81=AB=20(#127)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../processors/ReportAbuseProcessorService.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/packages/backend/src/queue/processors/ReportAbuseProcessorService.ts b/packages/backend/src/queue/processors/ReportAbuseProcessorService.ts index 70e0a095c2..b7366a648e 100644 --- a/packages/backend/src/queue/processors/ReportAbuseProcessorService.ts +++ b/packages/backend/src/queue/processors/ReportAbuseProcessorService.ts @@ -1,12 +1,9 @@ import { Injectable, Inject } from '@nestjs/common'; import { MoreThan, IsNull } from 'typeorm'; import RE2 from 're2'; -import sanitizeHtml from 'sanitize-html'; import { bindThis } from '@/decorators.js'; import type Logger from '@/logger.js'; import { RoleService } from '@/core/RoleService.js'; -import { MetaService } from '@/core/MetaService.js'; -import { EmailService } from '@/core/EmailService.js'; import { GlobalEventService } from '@/core/GlobalEventService.js'; import { InstanceActorService } from '@/core/InstanceActorService.js'; import type { AbuseReportResolversRepository, AbuseUserReportsRepository, UsersRepository } from '@/models/index.js'; @@ -36,8 +33,6 @@ export class ReportAbuseProcessorService { private instanceActorService: InstanceActorService, private apRendererService: ApRendererService, private roleService: RoleService, - private metaService: MetaService, - private emailService: EmailService, private queueService: QueueService, ) { this.logger = this.queueLoggerService.logger.createSubLogger('report-abuse'); @@ -85,7 +80,7 @@ export class ReportAbuseProcessorService { assigneeId: actor.id, forwarded: resolver.forward && job.data.targetUserHost !== null, }); - + return; } } @@ -102,13 +97,6 @@ export class ReportAbuseProcessorService { comment: job.data.comment, }); } - - const meta = await this.metaService.fetch(); - if (meta.email) { - this.emailService.sendEmail(meta.email, 'New abuse report', - sanitizeHtml(job.data.comment), - sanitizeHtml(job.data.comment)); - } }); } }