mirror of
https://github.com/Crazyco-xyz/48hr.email.git
synced 2026-01-09 19:29:34 +01:00
[Fix]: Fix expiry timer logic
This commit is contained in:
parent
7ac2ef7b76
commit
54822dad6f
1 changed files with 8 additions and 1 deletions
|
|
@ -344,7 +344,14 @@ class ImapService extends EventEmitter {
|
|||
} catch {
|
||||
// Do nothing
|
||||
}
|
||||
const date = headerPart.date[0]
|
||||
const rawDate = headerPart.date && headerPart.date[0] ? headerPart.date[0] : undefined
|
||||
let date
|
||||
if (rawDate) {
|
||||
const m = moment.parseZone(rawDate)
|
||||
date = m.toDate()
|
||||
} else {
|
||||
date = new Date()
|
||||
}
|
||||
const { uid } = message.attributes
|
||||
|
||||
return Mail.create(to, from, date, subject, uid)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue