fix(backend): メール配信機能が無効ならばメールを送ることのないように (#13152)

Do not send email if email delivery is disabled
This commit is contained in:
atsuchan 2024-02-04 20:44:35 +09:00 committed by GitHub
parent 66714d94fc
commit 2c4ba4723f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -40,6 +40,8 @@ export class EmailService {
public async sendEmail(to: string, subject: string, html: string, text: string) { public async sendEmail(to: string, subject: string, html: string, text: string) {
const meta = await this.metaService.fetch(true); const meta = await this.metaService.fetch(true);
if (!meta.enableEmail) return;
const iconUrl = `${this.config.url}/static-assets/mi-white.png`; const iconUrl = `${this.config.url}/static-assets/mi-white.png`;
const emailSettingUrl = `${this.config.url}/settings/email`; const emailSettingUrl = `${this.config.url}/settings/email`;