Populate registrationIds on deviceObjects
Saves us from doing so later. // FREEBIE
This commit is contained in:
parent
cf85c5e25e
commit
adf8445b85
2 changed files with 16 additions and 6 deletions
|
@ -35530,13 +35530,18 @@ axolotlInternal.RecipientRecord = function() {
|
|||
deviceIds.push(deviceId);
|
||||
}
|
||||
}
|
||||
return deviceIds.map(function(deviceId) {
|
||||
return Promise.all(deviceIds.map(function(deviceId) {
|
||||
var encodedNumber = number + '.' + deviceId;
|
||||
var deviceObject = tempKeys[encodedNumber] || {};
|
||||
deviceObject.encodedNumber = encodedNumber;
|
||||
deviceObject.identityKey = identityKey;
|
||||
return deviceObject;
|
||||
});
|
||||
return textsecure.protocol_wrapper.getRegistrationId(encodedNumber).then(function(registrationId) {
|
||||
if (deviceObject.registrationId === undefined) {
|
||||
deviceObject.registrationId = registrationId;
|
||||
}
|
||||
return deviceObject;
|
||||
});
|
||||
}));
|
||||
});
|
||||
});
|
||||
},
|
||||
|
|
|
@ -73,13 +73,18 @@
|
|||
deviceIds.push(deviceId);
|
||||
}
|
||||
}
|
||||
return deviceIds.map(function(deviceId) {
|
||||
return Promise.all(deviceIds.map(function(deviceId) {
|
||||
var encodedNumber = number + '.' + deviceId;
|
||||
var deviceObject = tempKeys[encodedNumber] || {};
|
||||
deviceObject.encodedNumber = encodedNumber;
|
||||
deviceObject.identityKey = identityKey;
|
||||
return deviceObject;
|
||||
});
|
||||
return textsecure.protocol_wrapper.getRegistrationId(encodedNumber).then(function(registrationId) {
|
||||
if (deviceObject.registrationId === undefined) {
|
||||
deviceObject.registrationId = registrationId;
|
||||
}
|
||||
return deviceObject;
|
||||
});
|
||||
}));
|
||||
});
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue