Revert "Don't refreshGroups in tryMessageAgain", making a better one
This reverts commit f9e68be45b
.
Conflicts:
js/sendmessage.js
This commit is contained in:
parent
1e4a7108e3
commit
67bb400b87
1 changed files with 11 additions and 9 deletions
|
@ -119,15 +119,17 @@ window.textsecure.messaging = function() {
|
|||
message.fetch().then(function() {
|
||||
textsecure.storage.removeEncrypted("devices" + number);
|
||||
var proto = textsecure.protobuf.PushMessageContent.decode(encodedMessage, 'binary');
|
||||
sendMessageProto(message.get('sent_at'), [number], proto, function(res) {
|
||||
if (res.failure.length > 0) {
|
||||
message.set('errors', res.failure);
|
||||
}
|
||||
else {
|
||||
message.set('errors', []);
|
||||
}
|
||||
message.save().then(function(){
|
||||
extension.trigger('message', message); // notify frontend listeners
|
||||
refreshGroups(number).then(function() {
|
||||
sendMessageProto(message.get('sent_at'), [number], proto, function(res) {
|
||||
if (res.failure.length > 0) {
|
||||
message.set('errors', res.failure);
|
||||
}
|
||||
else {
|
||||
message.set('errors', []);
|
||||
}
|
||||
message.save().then(function(){
|
||||
extension.trigger('message', message); // notify frontend listeners
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue