diff options
author | Chocobozzz <me@florianbigard.com> | 2019-02-14 13:17:10 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-02-14 13:17:10 +0100 |
commit | 98d33a03d3a86aad709e2cd39a4e4d8bac6b7664 (patch) | |
tree | d8e1e8d21054fc4d966c009bdd05333a2a6e44cb /server/lib/job-queue/handlers | |
parent | 73471b1a52f242e86364ffb077ea6cadb3b07ae2 (diff) | |
parent | 340f31ce96c456942fb01800f31d795e0f355d74 (diff) | |
download | PeerTube-98d33a03d3a86aad709e2cd39a4e4d8bac6b7664.tar.gz PeerTube-98d33a03d3a86aad709e2cd39a4e4d8bac6b7664.tar.zst PeerTube-98d33a03d3a86aad709e2cd39a4e4d8bac6b7664.zip |
Merge branch 'release/v1.2.0'
Diffstat (limited to 'server/lib/job-queue/handlers')
-rw-r--r-- | server/lib/job-queue/handlers/email.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/lib/job-queue/handlers/email.ts b/server/lib/job-queue/handlers/email.ts index 220d0af32..2ba39a156 100644 --- a/server/lib/job-queue/handlers/email.ts +++ b/server/lib/job-queue/handlers/email.ts | |||
@@ -6,14 +6,16 @@ export type EmailPayload = { | |||
6 | to: string[] | 6 | to: string[] |
7 | subject: string | 7 | subject: string |
8 | text: string | 8 | text: string |
9 | from?: string | 9 | |
10 | fromDisplayName?: string | ||
11 | replyTo?: string | ||
10 | } | 12 | } |
11 | 13 | ||
12 | async function processEmail (job: Bull.Job) { | 14 | async function processEmail (job: Bull.Job) { |
13 | const payload = job.data as EmailPayload | 15 | const payload = job.data as EmailPayload |
14 | logger.info('Processing email in job %d.', job.id) | 16 | logger.info('Processing email in job %d.', job.id) |
15 | 17 | ||
16 | return Emailer.Instance.sendMail(payload.to, payload.subject, payload.text, payload.from) | 18 | return Emailer.Instance.sendMail(payload) |
17 | } | 19 | } |
18 | 20 | ||
19 | // --------------------------------------------------------------------------- | 21 | // --------------------------------------------------------------------------- |