slight cleanup, thx qt
parent
2c120cf890
commit
729dcf17ef
|
@ -279,9 +279,8 @@ class ImapService extends EventEmitter {
|
||||||
|
|
||||||
const messages = await this.connection.search(searchCriteria, fetchOptions)
|
const messages = await this.connection.search(searchCriteria, fetchOptions)
|
||||||
if (messages.length === 0) {
|
if (messages.length === 0) {
|
||||||
return("womp womp")
|
return false
|
||||||
}
|
} else if (!raw) {
|
||||||
if (!raw) {
|
|
||||||
const fullBody = await _.find(messages[0].parts, {which: ''})
|
const fullBody = await _.find(messages[0].parts, {which: ''})
|
||||||
return simpleParser(fullBody.body)
|
return simpleParser(fullBody.body)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -32,7 +32,7 @@ router.get(
|
||||||
req.params.address,
|
req.params.address,
|
||||||
req.params.uid
|
req.params.uid
|
||||||
)
|
)
|
||||||
if (mail && mail != "womp womp") {
|
if (mail) {
|
||||||
// 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', {
|
||||||
|
@ -107,7 +107,7 @@ router.get(
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
mail = mail.replace(/(?:\r\n|\r|\n)/g, '<br>')
|
mail = mail.replace(/(?:\r\n|\r|\n)/g, '<br>')
|
||||||
if (mail && mail != "womp womp") {
|
if (mail) {
|
||||||
// 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('raw', {
|
res.render('raw', {
|
||||||
|
|
Loading…
Reference in New Issue