Commit c1123fd6 authored by JC Brand's avatar JC Brand

Used wrong registration id and identity key when building a session

updates #497
parent 05890513
...@@ -167,13 +167,13 @@ ...@@ -167,13 +167,13 @@
buildSession (device) { buildSession (device) {
const { _converse } = this.__super__; const { _converse } = this.__super__;
const bundle = device.get('bundle'), const bundle = device.get('bundle'),
address = new libsignal.SignalProtocolAddress(device.get('jid'), device.get('id')), address = new libsignal.SignalProtocolAddress(device.get('jid'), device.get('id')),
sessionBuilder = new libsignal.SessionBuilder(_converse.omemo_store, address), sessionBuilder = new libsignal.SessionBuilder(_converse.omemo_store, address),
prekey = device.getRandomPreKey(); prekey = device.getRandomPreKey();
return sessionBuilder.processPreKey({ return sessionBuilder.processPreKey({
'registrationId': parseInt(_converse.omemo_store.get('device_id'), 10), 'registrationId': parseInt(device.get('id'), 10),
'identityKey': u.base64ToArrayBuffer(_converse.omemo_store.get('identity_key')), 'identityKey': u.base64ToArrayBuffer(bundle.identity_key),
'signedPreKey': { 'signedPreKey': {
'keyId': bundle.signed_prekey.id, // <Number> 'keyId': bundle.signed_prekey.id, // <Number>
'publicKey': u.base64ToArrayBuffer(bundle.signed_prekey.public_key), 'publicKey': u.base64ToArrayBuffer(bundle.signed_prekey.public_key),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment