From 040426e80ac2511409d9870ee0814259cd9bdc7f Mon Sep 17 00:00:00 2001 From: Jackie Luo Date: Thu, 5 Jan 2017 13:00:46 -0800 Subject: [PATCH] [local-sync] Include from field in thread participants --- packages/local-sync/src/models/thread.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/local-sync/src/models/thread.js b/packages/local-sync/src/models/thread.js index 42c839e74..2b27bdfbe 100644 --- a/packages/local-sync/src/models/thread.js +++ b/packages/local-sync/src/models/thread.js @@ -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; }