Chocobozzz 2024-09-06 09:31:14 +02:00
parent ab6b2b55d5
commit f9b46e816e
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 4 additions and 3 deletions

View File

@ -202,7 +202,7 @@ describe('Test registrations', function () {
await server.registrations.reject({ id: id4, moderationResponse: 'I do not want id 4 on this instance' })
})
it('Should have sent an email to the user explanining the registration has been rejected', async function () {
it('Should have sent an email to the user explaining the registration has been rejected', async function () {
this.timeout(50000)
await waitJobs([ server ])
@ -220,7 +220,7 @@ describe('Test registrations', function () {
await server.registrations.accept({ id: id3, moderationResponse: 'Welcome id 3' })
})
it('Should have sent an email to the user explanining the registration has been accepted', async function () {
it('Should have sent an email to the user explaining the registration has been accepted', async function () {
this.timeout(50000)
await waitJobs([ server ])

View File

@ -1,6 +1,7 @@
import { arrayify } from '@peertube/peertube-core-utils'
import { EmailPayload, SendEmailDefaultOptions, UserExportState, UserRegistrationState } from '@peertube/peertube-models'
import { isTestOrDevInstance, root } from '@peertube/peertube-node-utils'
import { UserModel } from '@server/models/user/user.js'
import { readFileSync } from 'fs'
import merge from 'lodash-es/merge.js'
import { Transporter, createTransport } from 'nodemailer'
@ -10,7 +11,6 @@ import { CONFIG, isEmailEnabled } from '../initializers/config.js'
import { WEBSERVER } from '../initializers/constants.js'
import { MRegistration, MUser, MUserExport, MUserImport } from '../types/models/index.js'
import { JobQueue } from './job-queue/index.js'
import { UserModel } from '@server/models/user/user.js'
class Emailer {
@ -253,6 +253,7 @@ class Emailer {
const email = new EmailTemplates({
send: true,
juice: false,
htmlToText: {
selectors: [
{ selector: 'img', format: 'skip' },