From a66195a98f7b3390572b05a80dbef2788b1cb4ed Mon Sep 17 00:00:00 2001 From: lilia Date: Tue, 7 Jul 2015 16:13:14 -0700 Subject: [PATCH] Fix messages stuck in pending state The unset function, and the series of events/callbacks triggered by its use, are not as similar to the set/save functions as previously anticipated, leading to flux in the state of the 'pending' attribute. Fixes #283 // FREEBIE --- js/models/conversations.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/models/conversations.js b/js/models/conversations.js index 668928e32..e22b87e57 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -97,8 +97,7 @@ sendFunc = textsecure.messaging.sendMessageToGroup; } sendFunc(this.get('id'), body, attachments, now).then(function() { - message.unset('pending'); - message.save(); + message.save({'pending': false}); }.bind(this)).catch(function(errors) { if (errors instanceof Error) { errors = [errors];