From b6ebefe1cabb82a83ba5c896f4579ac96914311a Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Fri, 19 Feb 2016 19:19:43 -0800 Subject: [PATCH] fix(compose): More defensive check when switching from address, see description This fixes #1341, but is more restrictive: - You cannot switch From: accounts if the draft was retrieved from the sync engine (authored via Gmail or via another copy of N1. The sync-engine gives drafts a non-null threadId) - You cannot switch From: accounts if the draft is a forward from an existing thread. These two restrictions are unfortunately necessary to ensure that we don't have to download attachments we don't have to re-upload them to another account on the sync-engine. We could write code for this in the future but it's going to be gross. --- internal_packages/composer/lib/composer-view.cjsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal_packages/composer/lib/composer-view.cjsx b/internal_packages/composer/lib/composer-view.cjsx index f76be202a..b8c3800d6 100644 --- a/internal_packages/composer/lib/composer-view.cjsx +++ b/internal_packages/composer/lib/composer-view.cjsx @@ -553,7 +553,7 @@ class ComposerView extends React.Component return enabledFields _getAccountsForSend: => - if @_proxy.draft()?.replyToMessageId + if @_proxy.draft()?.threadId [AccountStore.accountForId(@_proxy.draft().accountId)] else AccountStore.accounts()