Handle provisioning messages with no profile key (#1470)
This can happen while linking to an older mobile client. // FREEBIE
This commit is contained in:
parent
c832324cb9
commit
fc952fbaf6
3 changed files with 16 additions and 6 deletions
|
@ -38261,7 +38261,9 @@ var TextSecureServer = (function() {
|
|||
textsecure.storage.put('signaling_key', signalingKey);
|
||||
textsecure.storage.put('password', password);
|
||||
textsecure.storage.put('registrationId', registrationId);
|
||||
textsecure.storage.put('profileKey', profileKey);
|
||||
if (profileKey) {
|
||||
textsecure.storage.put('profileKey', profileKey);
|
||||
}
|
||||
if (userAgent) {
|
||||
textsecure.storage.put('userAgent', userAgent);
|
||||
}
|
||||
|
@ -40282,13 +40284,16 @@ ProvisioningCipher.prototype = {
|
|||
var privKey = provisionMessage.identityKeyPrivate.toArrayBuffer();
|
||||
|
||||
return libsignal.Curve.async.createKeyPair(privKey).then(function(keyPair) {
|
||||
return {
|
||||
var ret = {
|
||||
identityKeyPair : keyPair,
|
||||
number : provisionMessage.number,
|
||||
provisioningCode : provisionMessage.provisioningCode,
|
||||
userAgent : provisionMessage.userAgent,
|
||||
profileKey : provisionMessage.profileKey.toArrayBuffer()
|
||||
};
|
||||
if (provisionMessage.profileKey) {
|
||||
ret.profileKey = provisionMessage.profileKey.toArrayBuffer();
|
||||
}
|
||||
return ret;
|
||||
});
|
||||
});
|
||||
},
|
||||
|
|
|
@ -31,13 +31,16 @@ ProvisioningCipher.prototype = {
|
|||
var privKey = provisionMessage.identityKeyPrivate.toArrayBuffer();
|
||||
|
||||
return libsignal.Curve.async.createKeyPair(privKey).then(function(keyPair) {
|
||||
return {
|
||||
var ret = {
|
||||
identityKeyPair : keyPair,
|
||||
number : provisionMessage.number,
|
||||
provisioningCode : provisionMessage.provisioningCode,
|
||||
userAgent : provisionMessage.userAgent,
|
||||
profileKey : provisionMessage.profileKey.toArrayBuffer()
|
||||
};
|
||||
if (provisionMessage.profileKey) {
|
||||
ret.profileKey = provisionMessage.profileKey.toArrayBuffer();
|
||||
}
|
||||
return ret;
|
||||
});
|
||||
});
|
||||
},
|
||||
|
|
|
@ -220,7 +220,9 @@
|
|||
textsecure.storage.put('signaling_key', signalingKey);
|
||||
textsecure.storage.put('password', password);
|
||||
textsecure.storage.put('registrationId', registrationId);
|
||||
textsecure.storage.put('profileKey', profileKey);
|
||||
if (profileKey) {
|
||||
textsecure.storage.put('profileKey', profileKey);
|
||||
}
|
||||
if (userAgent) {
|
||||
textsecure.storage.put('userAgent', userAgent);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue