mirror of
https://github.com/Crazyco-xyz/48hr.email.git
synced 2025-07-01 14:37:09 +02:00
Fix missing subject issues
This commit is contained in:
parent
5a1d7c038d
commit
38cd67f881
2 changed files with 8 additions and 0 deletions
|
@ -254,6 +254,8 @@ class ImapService extends EventEmitter {
|
||||||
.map(addressObj => addressObj.address)
|
.map(addressObj => addressObj.address)
|
||||||
|
|
||||||
const from = headerPart.from.flatMap(from => addressparser(from))
|
const from = headerPart.from.flatMap(from => addressparser(from))
|
||||||
|
|
||||||
|
// Specify default subject, in case none exists.
|
||||||
let subject = "No Subject"
|
let subject = "No Subject"
|
||||||
try {
|
try {
|
||||||
subject = headerPart.subject[0]
|
subject = headerPart.subject[0]
|
||||||
|
|
|
@ -33,6 +33,12 @@ router.get(
|
||||||
req.params.uid
|
req.params.uid
|
||||||
)
|
)
|
||||||
if (mail) {
|
if (mail) {
|
||||||
|
|
||||||
|
// Set a default subject if none is present
|
||||||
|
if (!mail.subject) {
|
||||||
|
mail.subject = 'No Subject'
|
||||||
|
}
|
||||||
|
|
||||||
// Emails are immutable, cache if found
|
// Emails are immutable, cache if found
|
||||||
res.set('Cache-Control', 'private, max-age=600')
|
res.set('Cache-Control', 'private, max-age=600')
|
||||||
res.render('mail', {
|
res.render('mail', {
|
||||||
|
|
Loading…
Add table
Reference in a new issue