Don't refreshGroups in tryMessageAgain

This was intended to sync the group state of a recently re-installed
client, but is prone to overkill when we have a lot of old stale groups
around. Also this implementation incurs some rate limit errors from the
server.
This commit is contained in:
lilia 2014-12-22 17:34:17 -08:00
parent 2462aba24b
commit f9e68be45b

View file

@ -118,7 +118,6 @@ window.textsecure.messaging = function() {
var message = new Whisper.MessageCollection().add({id: message_id}); var message = new Whisper.MessageCollection().add({id: message_id});
message.fetch().then(function() { message.fetch().then(function() {
textsecure.storage.removeEncrypted("devices" + number); textsecure.storage.removeEncrypted("devices" + number);
refreshGroups(number).then(function() {
var proto = textsecure.protobuf.PushMessageContent.decode(encodedMessage, 'binary'); var proto = textsecure.protobuf.PushMessageContent.decode(encodedMessage, 'binary');
sendMessageProto([number], proto, function(res) { sendMessageProto([number], proto, function(res) {
if (res.failure.length > 0) { if (res.failure.length > 0) {
@ -132,7 +131,6 @@ window.textsecure.messaging = function() {
}); });
}); });
}); });
});
}; };
textsecure.replay.registerFunction(tryMessageAgain, textsecure.replay.Type.SEND_MESSAGE); textsecure.replay.registerFunction(tryMessageAgain, textsecure.replay.Type.SEND_MESSAGE);