From dabe51fd68b47fb6db78df1b881602065c0b18b7 Mon Sep 17 00:00:00 2001 From: lilia Date: Thu, 10 Dec 2015 16:13:14 -0800 Subject: [PATCH] Mark message sent iff at least 1 recipient got it Previously, we would always mark a message sent even if all our network requests failed. Fix #484 // FREEBIE --- js/models/messages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/models/messages.js b/js/models/messages.js index e0c4ecc1..8e8265f4 100644 --- a/js/models/messages.js +++ b/js/models/messages.js @@ -152,13 +152,13 @@ if (result.dataMessage) { this.set({dataMessage: result.dataMessage}); } - this.set({sent: true}); if (result instanceof Error) { this.saveErrors(result); } else { this.saveErrors(result.errors); if (result.successfulNumbers.length > 0) { + this.set({sent: true}); this.sendSyncMessage(); } }