Update libsignal-protocol / Update prekey format

Integrates change in prekey object formatting, which now matches more
conveniently with the representation rendered by the server.

// FREEBIE
This commit is contained in:
lilia
2016-04-27 15:21:44 -07:00
parent 6589ec544a
commit 9f871db48a
6 changed files with 49 additions and 105 deletions

View File

@@ -34513,19 +34513,7 @@ window.libsignal.protocol = function(storage_interface) {
var address = SignalProtocolAddress.fromString(deviceObject.encodedNumber);
var builder = new SessionBuilder(storage_interface, address);
return builder.processPreKey({
identityKey: toArrayBuffer(deviceObject.identityKey),
preKey: {
keyId: deviceObject.preKeyId,
publicKey: toArrayBuffer(deviceObject.preKey),
},
signedPreKey: {
keyId: deviceObject.signedKeyId,
publicKey: toArrayBuffer(deviceObject.signedKey),
signature: toArrayBuffer(deviceObject.signedKeySignature),
},
registrationId: deviceObject.registrationId
});
return builder.processPreKey(deviceObject);
}
}).then(function() {
return getRecord(deviceObject.encodedNumber).then(function(refreshed) {