mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
use the shortened title as subject
This commit is contained in:
parent
e013963143
commit
2fd3b930fe
1 changed files with 5 additions and 5 deletions
|
|
@ -571,17 +571,17 @@ const sendEmail = async (
|
|||
) => {
|
||||
const createdAt = digest.createdAt ?? new Date()
|
||||
|
||||
const title = 'Omnivore Digest'
|
||||
const subject = `${title} ${createdAt.toLocaleDateString()}`
|
||||
const prefix = 'Omnivore Digest'
|
||||
const title = `${prefix} ${createdAt.toLocaleDateString()}`
|
||||
const subTitle = truncate(digest.title, { length: 200 }).slice(
|
||||
title.length + 1
|
||||
prefix.length + 1
|
||||
)
|
||||
|
||||
const chapters = digest.chapters ?? []
|
||||
|
||||
const html = `
|
||||
<div style="text-align: justify;">
|
||||
<h1 style="text-align: center;">${subject}</h1>
|
||||
<h2>${title}</h1>
|
||||
<h2>${subTitle}</h2>
|
||||
|
||||
${chapters
|
||||
|
|
@ -600,7 +600,7 @@ const sendEmail = async (
|
|||
await enqueueSendEmail({
|
||||
to: user.email,
|
||||
from: env.sender.message,
|
||||
subject,
|
||||
subject: subTitle,
|
||||
html,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue