From 476a1c4167ec5a925d0d3876ffbfce0d04fad67e Mon Sep 17 00:00:00 2001 From: Evan Morikawa Date: Thu, 18 Aug 2016 12:14:53 -0700 Subject: [PATCH] fix(draft): prepareDraftForSyncback double checks quotes on send later --- src/flux/stores/draft-helpers.es6 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/flux/stores/draft-helpers.es6 b/src/flux/stores/draft-helpers.es6 index 17713acc2..80f888224 100644 --- a/src/flux/stores/draft-helpers.es6 +++ b/src/flux/stores/draft-helpers.es6 @@ -35,7 +35,9 @@ export function isForwardedMessage({body, subject} = {}) { } export function shouldAppendQuotedText({body = '', replyToMessageId = false} = {}) { - return replyToMessageId && !body.includes('
') + return replyToMessageId && + !body.includes('
') && + !body.includes(`nylas-quote-id-${replyToMessageId}`) } export function messageMentionsAttachment({body} = {}) { @@ -59,7 +61,7 @@ export function appendQuotedTextToDraft(draft) { .include(Message.attributes.body) .then((prevMessage) => { const quotedText = ` -
+

${DOMUtils.escapeHTMLCharacters(prevMessage.replyAttributionLine())}