Invert pending/sent model

This commit is contained in:
lilia 2015-07-07 19:21:10 -07:00
parent a66195a98f
commit fa4022a4e3
6 changed files with 18 additions and 12 deletions

View file

@ -75,8 +75,7 @@
type : 'outgoing',
attachments : attachments,
sent_at : now,
received_at : now,
pending : true
received_at : now
});
message.save();
@ -97,7 +96,7 @@
sendFunc = textsecure.messaging.sendMessageToGroup;
}
sendFunc(this.get('id'), body, attachments, now).then(function() {
message.save({'pending': false});
message.save({'sent': true});
}.bind(this)).catch(function(errors) {
if (errors instanceof Error) {
errors = [errors];