[local-sync] Give Nylas Mail messages a different Message-ID from API messages

Summary:
We may find it useful at some point to be able to tell which messages in
a user's mailbox were sent using N1/the REST API vs Nylas Mail.

Test Plan: manual

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3631
This commit is contained in:
Christine Spang 2017-01-10 13:29:30 -08:00
parent 9136b0592b
commit e1271cf25c
5 changed files with 25 additions and 25 deletions

View file

@ -8,7 +8,7 @@ module.exports = {
"x-gm-thrid": "GMAILTHREAD1",
"Delivered-To": "jackiehluo@gmail.com",
"Date": "Fri, 17 Jun 2016 09:38:44 -0700 (PDT)",
"Message-Id": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@mailer.nylas.com>",
"Message-Id": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@nylas-mail.nylas.com>",
"X-Inbox-Id": "82y7eq1ipmadaxwcy6kr072bw-2147483647",
},
from: [{
@ -21,7 +21,7 @@ module.exports = {
}],
cc: [],
bcc: [],
headerMessageId: "<82y7eq1ipmadaxwcy6kr072bw-2147483647@mailer.nylas.com>",
headerMessageId: "<82y7eq1ipmadaxwcy6kr072bw-2147483647@nylas-mail.nylas.com>",
snippet: "Hi Jackie, While browsing Nylas themes, I stumbled upon your website and looked at your work. Great ",
},
B: {
@ -32,9 +32,9 @@ module.exports = {
headers: {
"x-gm-thrid": "GMAILTHREAD2",
"Date": "Fri, 17 Jun 2016 18:20:47 +0000",
"References": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@mailer.nylas.com>",
"In-Reply-To": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@mailer.nylas.com>",
"Message-Id": "<cq08iqwatp00kai4qnff7zbaj-2147483647@mailer.nylas.com>",
"References": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@nylas-mail.nylas.com>",
"In-Reply-To": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@nylas-mail.nylas.com>",
"Message-Id": "<cq08iqwatp00kai4qnff7zbaj-2147483647@nylas-mail.nylas.com>",
"X-Inbox-Id": "cq08iqwatp00kai4qnff7zbaj-2147483647",
},
from: [{
@ -47,7 +47,7 @@ module.exports = {
}],
cc: [],
bcc: [],
headerMessageId: "<cq08iqwatp00kai4qnff7zbaj-2147483647@mailer.nylas.com>",
headerMessageId: "<cq08iqwatp00kai4qnff7zbaj-2147483647@nylas-mail.nylas.com>",
snippet: "Sagar, Aw, glad to hear it! Thanks for getting in touch! Jackie Luo Software Engineer, Nylas",
},
};

View file

@ -8,7 +8,7 @@ module.exports = {
"x-gm-thrid": "GMAILTHREAD1",
"Delivered-To": "jackiehluo@gmail.com",
"Date": "Fri, 17 Jun 2016 09:38:44 -0700 (PDT)",
"Message-Id": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@mailer.nylas.com>",
"Message-Id": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@nylas-mail.nylas.com>",
"X-Inbox-Id": "82y7eq1ipmadaxwcy6kr072bw-2147483647",
},
from: [{
@ -21,7 +21,7 @@ module.exports = {
}],
cc: [],
bcc: [],
headerMessageId: "<82y7eq1ipmadaxwcy6kr072bw-2147483647@mailer.nylas.com>",
headerMessageId: "<82y7eq1ipmadaxwcy6kr072bw-2147483647@nylas-mail.nylas.com>",
snippet: "Hi Jackie, While browsing Nylas themes, I stumbled upon your website and looked at your work. Great ",
},
B: {
@ -32,9 +32,9 @@ module.exports = {
headers: {
"x-gm-thrid": "GMAILTHREAD1",
"Date": "Fri, 17 Jun 2016 18:20:47 +0000",
"References": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@mailer.nylas.com>",
"In-Reply-To": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@mailer.nylas.com>",
"Message-Id": "<cq08iqwatp00kai4qnff7zbaj-2147483647@mailer.nylas.com>",
"References": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@nylas-mail.nylas.com>",
"In-Reply-To": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@nylas-mail.nylas.com>",
"Message-Id": "<cq08iqwatp00kai4qnff7zbaj-2147483647@nylas-mail.nylas.com>",
"X-Inbox-Id": "cq08iqwatp00kai4qnff7zbaj-2147483647",
},
from: [{
@ -47,7 +47,7 @@ module.exports = {
}],
cc: [],
bcc: [],
headerMessageId: "<cq08iqwatp00kai4qnff7zbaj-2147483647@mailer.nylas.com>",
headerMessageId: "<cq08iqwatp00kai4qnff7zbaj-2147483647@nylas-mail.nylas.com>",
snippet: "Sagar, Aw, glad to hear it! Thanks for getting in touch! Jackie Luo Software Engineer, Nylas",
},
};

View file

@ -33,7 +33,7 @@ module.exports = {
Fri, 17 Jun 2016 09:38:44 -0700 (PDT)`,
"Date": "Fri, 17 Jun 2016 09:38:44 -0700 (PDT)",
"User-Agent": "NylasMailer/0.4",
"Message-Id": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@mailer.nylas.com>",
"Message-Id": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@nylas-mail.nylas.com>",
"X-Inbox-Id": "82y7eq1ipmadaxwcy6kr072bw-2147483647",
},
from: [{
@ -46,7 +46,7 @@ module.exports = {
}],
cc: [],
bcc: [],
headerMessageId: "<82y7eq1ipmadaxwcy6kr072bw-2147483647@mailer.nylas.com>",
headerMessageId: "<82y7eq1ipmadaxwcy6kr072bw-2147483647@nylas-mail.nylas.com>",
snippet: "Hi Jackie, While browsing Nylas themes, I stumbled upon your website and looked at your work. Great ",
},
B: {
@ -56,10 +56,10 @@ module.exports = {
body: "<head></head><body>Sagar,<div><div><br></div><div>Aw, glad to hear it! Thanks for getting in touch!</div><br><!-- <signature> -->Jackie Luo<div>Software Engineer, Nylas</div><br><!-- </signature> --></div><div class=\"gmail_quote\">On Jun 17 2016, at 9:38 am, Sagar Sutar &lt;sagar_s@nid.edu&gt; wrote:<br><blockquote class=\"gmail_quote\" style=\"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;\">Hi Jackie,<div><div>While browsing Nylas&nbsp;themes, I stumbled upon your website and looked at your work.&nbsp;</div><div>Great work on projects, nice to see your multidisciplinary interests :)</div><div><div><br></div>Thanks,&nbsp;<div>Sagar Sutar</div><div>thesagarsutar.me</div></div></div><img width=\"0\" height=\"0\" style=\"border:0; width:0; height:0;\" src=\"https://link.nylas.com/open/8w734mdm7q9ivpc0cnq3ousy3/local-7b7d5479-575c?r=amFja2llaGx1b0BnbWFpbC5jb20=\"></blockquote></div></body>",
headers: {
"Date": "Fri, 17 Jun 2016 18:20:47 +0000",
"References": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@mailer.nylas.com>",
"In-Reply-To": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@mailer.nylas.com>",
"References": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@nylas-mail.nylas.com>",
"In-Reply-To": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@nylas-mail.nylas.com>",
"User-Agent": "NylasMailer/0.4",
"Message-Id": "<cq08iqwatp00kai4qnff7zbaj-2147483647@mailer.nylas.com>",
"Message-Id": "<cq08iqwatp00kai4qnff7zbaj-2147483647@nylas-mail.nylas.com>",
"X-Inbox-Id": "cq08iqwatp00kai4qnff7zbaj-2147483647",
},
from: [{
@ -72,7 +72,7 @@ module.exports = {
}],
cc: [],
bcc: [],
headerMessageId: "<cq08iqwatp00kai4qnff7zbaj-2147483647@mailer.nylas.com>",
headerMessageId: "<cq08iqwatp00kai4qnff7zbaj-2147483647@nylas-mail.nylas.com>",
snippet: "Sagar, Aw, glad to hear it! Thanks for getting in touch! Jackie Luo Software Engineer, Nylas",
},
};

View file

@ -33,7 +33,7 @@ module.exports = {
Fri, 17 Jun 2016 09:38:44 -0700 (PDT)`,
"Date": "Fri, 17 Jun 2016 09:38:44 -0700 (PDT)",
"User-Agent": "NylasMailer/0.4",
"Message-Id": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@mailer.nylas.com>",
"Message-Id": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@nylas-mail.nylas.com>",
"X-Inbox-Id": "82y7eq1ipmadaxwcy6kr072bw-2147483647",
},
from: [{
@ -46,7 +46,7 @@ module.exports = {
}],
cc: [],
bcc: [],
headerMessageId: "<82y7eq1ipmadaxwcy6kr072bw-2147483647@mailer.nylas.com>",
headerMessageId: "<82y7eq1ipmadaxwcy6kr072bw-2147483647@nylas-mail.nylas.com>",
snippet: "Hi Jackie, While browsing Nylas themes, I stumbled upon your website and looked at your work. Great ",
},
B: {
@ -56,10 +56,10 @@ module.exports = {
body: "<head></head><body>Sagar,<div><div><br></div><div>Aw, glad to hear it! Thanks for getting in touch!</div><br><!-- <signature> -->Jackie Luo<div>Software Engineer, Nylas</div><br><!-- </signature> --></div><div class=\"gmail_quote\">On Jun 17 2016, at 9:38 am, Sagar Sutar &lt;sagar_s@nid.edu&gt; wrote:<br><blockquote class=\"gmail_quote\" style=\"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;\">Hi Jackie,<div><div>While browsing Nylas&nbsp;themes, I stumbled upon your website and looked at your work.&nbsp;</div><div>Great work on projects, nice to see your multidisciplinary interests :)</div><div><div><br></div>Thanks,&nbsp;<div>Sagar Sutar</div><div>thesagarsutar.me</div></div></div><img width=\"0\" height=\"0\" style=\"border:0; width:0; height:0;\" src=\"https://link.nylas.com/open/8w734mdm7q9ivpc0cnq3ousy3/local-7b7d5479-575c?r=amFja2llaGx1b0BnbWFpbC5jb20=\"></blockquote></div></body>",
headers: {
"Date": "Fri, 17 Jun 2016 18:20:47 +0000",
"References": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@mailer.nylas.com>",
"In-Reply-To": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@mailer.nylas.com>",
"References": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@nylas-mail.nylas.com>",
"In-Reply-To": "<82y7eq1ipmadaxwcy6kr072bw-2147483647@nylas-mail.nylas.com>",
"User-Agent": "NylasMailer/0.4",
"Message-Id": "<cq08iqwatp00kai4qnff7zbaj-2147483647@mailer.nylas.com>",
"Message-Id": "<cq08iqwatp00kai4qnff7zbaj-2147483647@nylas-mail.nylas.com>",
"X-Inbox-Id": "cq08iqwatp00kai4qnff7zbaj-2147483647",
},
from: [{
@ -72,7 +72,7 @@ module.exports = {
}],
cc: [],
bcc: [],
headerMessageId: "<cq08iqwatp00kai4qnff7zbaj-2147483647@mailer.nylas.com>",
headerMessageId: "<cq08iqwatp00kai4qnff7zbaj-2147483647@nylas-mail.nylas.com>",
snippet: "Sagar, Aw, glad to hear it! Thanks for getting in touch! Jackie Luo Software Engineer, Nylas",
},
};

View file

@ -87,7 +87,7 @@ module.exports = (sequelize, Sequelize) => {
},
buildHeaderMessageId(id) {
return `<${id}@mailer.nylas.com>`
return `<${id}@nylas-mail.nylas.com>`
},
// async findMultiSendMessage(db, messageId) {