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
This commit is contained in:
lilia 2015-07-07 16:13:14 -07:00
parent 3cbe4f1f46
commit a66195a98f

View file

@ -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];