[local-sync] Include from field in thread participants

This commit is contained in:
Jackie Luo 2017-01-05 13:00:46 -08:00
parent c7bec7150a
commit 040426e80a

View file

@ -76,9 +76,9 @@ module.exports = (sequelize, Sequelize) => {
}
// Update thread participants
const {to, cc, bcc} = message;
const {to, cc, bcc, from} = message;
const participantEmails = this.participants.map(contact => contact.email);
const newParticipants = to.concat(cc, bcc).filter(contact => {
const newParticipants = to.concat(cc, bcc, from).filter(contact => {
if (participantEmails.includes(contact.email)) {
return false;
}