mirror of https://github.com/Chocobozzz/PeerTube
parent
ef80c66cea
commit
dee77e767f
|
@ -13,6 +13,15 @@ import { VideoBlacklistModel } from '../models/video/video-blacklist'
|
||||||
import { VideoImportModel } from '../models/video/video-import'
|
import { VideoImportModel } from '../models/video/video-import'
|
||||||
import { ActorFollowModel } from '../models/activitypub/actor-follow'
|
import { ActorFollowModel } from '../models/activitypub/actor-follow'
|
||||||
|
|
||||||
|
type SendEmailOptions = {
|
||||||
|
to: string[]
|
||||||
|
subject: string
|
||||||
|
text: string
|
||||||
|
|
||||||
|
fromDisplayName?: string
|
||||||
|
replyTo?: string
|
||||||
|
}
|
||||||
|
|
||||||
class Emailer {
|
class Emailer {
|
||||||
|
|
||||||
private static instance: Emailer
|
private static instance: Emailer
|
||||||
|
@ -402,5 +411,6 @@ class Emailer {
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
export {
|
export {
|
||||||
Emailer
|
Emailer,
|
||||||
|
SendEmailOptions
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,8 @@
|
||||||
import * as Bull from 'bull'
|
import * as Bull from 'bull'
|
||||||
import { logger } from '../../../helpers/logger'
|
import { logger } from '../../../helpers/logger'
|
||||||
import { Emailer } from '../../emailer'
|
import { Emailer, SendEmailOptions } from '../../emailer'
|
||||||
|
|
||||||
export type EmailPayload = {
|
export type EmailPayload = SendEmailOptions
|
||||||
to: string[]
|
|
||||||
subject: string
|
|
||||||
text: string
|
|
||||||
|
|
||||||
fromDisplayName?: string
|
|
||||||
replyTo?: string
|
|
||||||
}
|
|
||||||
|
|
||||||
async function processEmail (job: Bull.Job) {
|
async function processEmail (job: Bull.Job) {
|
||||||
const payload = job.data as EmailPayload
|
const payload = job.data as EmailPayload
|
||||||
|
|
Loading…
Reference in New Issue