mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
add chapters to the digest email
This commit is contained in:
parent
20408277d2
commit
0692ab0454
1 changed files with 16 additions and 2 deletions
|
|
@ -564,10 +564,24 @@ const sendPushNotification = async (userId: string, digest: Digest) => {
|
|||
|
||||
const sendEmail = async (user: User, digest: Digest) => {
|
||||
const title = digest.title ?? 'Omnivore digest'
|
||||
const chapters = digest.chapters ?? []
|
||||
const html = `
|
||||
<h>${title}</p>
|
||||
<h1>${title}</p>
|
||||
|
||||
<h1>Transcript</h1>
|
||||
<h2>Chapters</h1>
|
||||
<ul>
|
||||
${chapters
|
||||
.map(
|
||||
(chapter) => `
|
||||
<li>
|
||||
<a href="${chapter.url}">${chapter.title}</a>
|
||||
</li>
|
||||
`
|
||||
)
|
||||
.join('')}
|
||||
</ul>
|
||||
|
||||
<h2>Transcript</h1>
|
||||
<p>${digest.content ?? 'Transcript not available'}</p>
|
||||
`
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue