Fix up refreshGroup

pull/749/head
lilia 11 years ago
parent f774047935
commit 748f32022a

@ -39601,10 +39601,10 @@ window.textsecure.messaging = function() {
groupId = getString(groupId); groupId = getString(groupId);
var doUpdate = false; var doUpdate = false;
Promise.all(devicesForNumber.map(function(device) { return Promise.all(devicesForNumber.map(function(device) {
return textsecure.protocol_wrapper.getRegistrationId(device.encodedNumber).then(function(registrationId) { return textsecure.protocol_wrapper.getRegistrationId(device.encodedNumber).then(function(registrationId) {
return textsecure.storage.groups.needUpdateByDeviceRegistrationId( return textsecure.storage.groups.needUpdateByDeviceRegistrationId(
groupId, number, devicesForNumber[i].encodedNumber, registrationId groupId, number, device.encodedNumber, registrationId
).then(function(needUpdate) { ).then(function(needUpdate) {
if (needUpdate) doUpdate = true; if (needUpdate) doUpdate = true;
}); });

@ -97,10 +97,10 @@ window.textsecure.messaging = function() {
groupId = getString(groupId); groupId = getString(groupId);
var doUpdate = false; var doUpdate = false;
Promise.all(devicesForNumber.map(function(device) { return Promise.all(devicesForNumber.map(function(device) {
return textsecure.protocol_wrapper.getRegistrationId(device.encodedNumber).then(function(registrationId) { return textsecure.protocol_wrapper.getRegistrationId(device.encodedNumber).then(function(registrationId) {
return textsecure.storage.groups.needUpdateByDeviceRegistrationId( return textsecure.storage.groups.needUpdateByDeviceRegistrationId(
groupId, number, devicesForNumber[i].encodedNumber, registrationId groupId, number, device.encodedNumber, registrationId
).then(function(needUpdate) { ).then(function(needUpdate) {
if (needUpdate) doUpdate = true; if (needUpdate) doUpdate = true;
}); });

Loading…
Cancel
Save