Revert "Don't refreshGroups in tryMessageAgain", making a better one

This reverts commit f9e68be45b.

Conflicts:
	js/sendmessage.js
This commit is contained in:
Matt Corallo 2014-12-24 18:04:47 -05:00
parent 1e4a7108e3
commit 67bb400b87

View file

@ -119,15 +119,17 @@ window.textsecure.messaging = function() {
message.fetch().then(function() { message.fetch().then(function() {
textsecure.storage.removeEncrypted("devices" + number); textsecure.storage.removeEncrypted("devices" + number);
var proto = textsecure.protobuf.PushMessageContent.decode(encodedMessage, 'binary'); var proto = textsecure.protobuf.PushMessageContent.decode(encodedMessage, 'binary');
sendMessageProto(message.get('sent_at'), [number], proto, function(res) { refreshGroups(number).then(function() {
if (res.failure.length > 0) { sendMessageProto(message.get('sent_at'), [number], proto, function(res) {
message.set('errors', res.failure); if (res.failure.length > 0) {
} message.set('errors', res.failure);
else { }
message.set('errors', []); else {
} message.set('errors', []);
message.save().then(function(){ }
extension.trigger('message', message); // notify frontend listeners message.save().then(function(){
extension.trigger('message', message); // notify frontend listeners
});
}); });
}); });
}); });