fix: 通報の通知メールを発送しないように (#127)

This commit is contained in:
まっちゃとーにゅ 2023-07-30 01:49:20 +09:00 committed by GitHub
parent 2d0a3ad40d
commit d08ea708fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 13 deletions

View File

@ -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');
@ -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));
}
});
}
}