mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-03-03 19:43:04 +08:00
Merge branch 'master' of ssh://github.com/nylas/k2
This commit is contained in:
commit
ea4d5d0054
2 changed files with 3 additions and 6 deletions
|
@ -27,9 +27,8 @@ class ContactProcessor {
|
|||
}
|
||||
|
||||
|
||||
processMessage({db, message, logger}) {
|
||||
processMessage({db, message}) {
|
||||
const {Contact} = db;
|
||||
this.logger = logger
|
||||
|
||||
let allContacts = []
|
||||
const fields = ['to', 'from', 'bcc', 'cc']
|
||||
|
|
|
@ -77,7 +77,6 @@ class ThreadingProcessor {
|
|||
throw new Error("Threading processMessage expects folder value to be present.");
|
||||
}
|
||||
|
||||
this.logger = logger
|
||||
|
||||
const {Folder, Label} = db;
|
||||
let findOrCreateThread = null;
|
||||
|
@ -140,13 +139,12 @@ class ThreadingProcessor {
|
|||
isSent = !!message.labels.find(l => l.id === sentLabel.id)
|
||||
}
|
||||
|
||||
if (isSent && (message.date > thread.lastMessageSentDate)) {
|
||||
if (isSent && ((message.date > thread.lastMessageSentDate) || !thread.lastMessageSentDate)) {
|
||||
thread.lastMessageSentDate = message.date;
|
||||
}
|
||||
if (!isSent && (message.date > thread.lastMessageReceivedDate)) {
|
||||
if (!isSent && ((message.date > thread.lastMessageReceivedDate) || !thread.lastMessageReceivedDate)) {
|
||||
thread.lastMessageReceivedDate = message.date;
|
||||
}
|
||||
|
||||
// update folders and labels
|
||||
if (!thread.folders.find(f => f.id === message.folderId)) {
|
||||
thread.addFolder(message.folder)
|
||||
|
|
Loading…
Reference in a new issue