mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-11 02:30:21 +08:00
Check In-Reply-To instead of References
This commit is contained in:
parent
179f24449b
commit
cf421cbb2d
1 changed files with 4 additions and 5 deletions
|
@ -104,10 +104,9 @@ function cleanSubject(subject) {
|
|||
return cleanedSubject
|
||||
}
|
||||
|
||||
function getThreadFromReferences({db, references}) {
|
||||
function getThreadFromHeader({db, inReplyTo}) {
|
||||
const {Message} = db
|
||||
const messageId = references.split()[references.length - 1]
|
||||
return Message.find({where: {messageId: messageId}})
|
||||
return Message.find({where: {messageId: inReplyTo}})
|
||||
.then((message) => {
|
||||
return message.getThread()
|
||||
})
|
||||
|
@ -115,8 +114,8 @@ function getThreadFromReferences({db, references}) {
|
|||
|
||||
function matchThread({db, accountId, message}) {
|
||||
const {Thread} = db
|
||||
if (message.headers.references) {
|
||||
return getThreadFromReferences()
|
||||
if (message.headers['In-Reply-To']) {
|
||||
return getThreadFromHeader({db, inReplyTo: message.headers['In-Reply-To']})
|
||||
.then((thread) => {
|
||||
if (thread) {
|
||||
return thread
|
||||
|
|
Loading…
Reference in a new issue