From 13087a0dc833df3996ec1d278c603d6f8a58f3d7 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Tue, 25 Aug 2015 12:23:27 -0700 Subject: [PATCH] fix(draft-account-switching): Need to totally delete draft threadId and replyToMessageId --- src/flux/tasks/syncback-draft.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/flux/tasks/syncback-draft.coffee b/src/flux/tasks/syncback-draft.coffee index 21aab39d1..675f40357 100644 --- a/src/flux/tasks/syncback-draft.coffee +++ b/src/flux/tasks/syncback-draft.coffee @@ -116,5 +116,9 @@ class SyncbackDraftTask extends Task newDraft = new Message(draft) newDraft.id = generateTempId() newDraft.accountId = newAccountId if newAccountId + + delete newDraft.threadId + delete newDraft.replyToMessageId + DatabaseStore.swapModel(oldModel: draft, newModel: newDraft, localId: @draftLocalId).then => Promise.resolve(newDraft)