diff --git a/dist/converse.js b/dist/converse.js index c473641a6..b4e5b7ede 100644 --- a/dist/converse.js +++ b/dist/converse.js @@ -74173,7 +74173,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ try { return sessionBuilder.processPreKey({ 'registrationId': parseInt(_converse.omemo_store.get('device_id'), 10), - 'identityKey': _converse.omemo_store.get('identity_key'), + 'identityKey': u.base64ToArrayBuffer(_converse.omemo_store.get('identity_key')), 'signedPreKey': { 'keyId': bundle.signed_prekey.id, // @@ -74653,7 +74653,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ }; return libsignal.KeyHelper.generateIdentityKeyPair().then(identity_keypair => { data['identity_keypair'] = identity_keypair; - data['identity_key'] = identity_keypair.pubKey; + data['identity_key'] = u.arrayBufferToBase64(identity_keypair.pubKey); return libsignal.KeyHelper.generateSignedPreKey(identity_keypair, 1); }).then(signed_prekey => { _converse.omemo_store.storeSignedPreKey(signed_prekey.keyId, signed_prekey.keyPair); diff --git a/src/converse-omemo.js b/src/converse-omemo.js index 48eaa8621..fc5d682d4 100644 --- a/src/converse-omemo.js +++ b/src/converse-omemo.js @@ -177,7 +177,7 @@ try { return sessionBuilder.processPreKey({ 'registrationId': parseInt(_converse.omemo_store.get('device_id'), 10), - 'identityKey': _converse.omemo_store.get('identity_key'), + 'identityKey': u.base64ToArrayBuffer(_converse.omemo_store.get('identity_key')), 'signedPreKey': { 'keyId': bundle.signed_prekey.id, // 'publicKey': u.base64ToArrayBuffer(bundle.signed_prekey.public_key), @@ -631,7 +631,7 @@ return libsignal.KeyHelper.generateIdentityKeyPair() .then(identity_keypair => { data['identity_keypair'] = identity_keypair; - data['identity_key'] = identity_keypair.pubKey; + data['identity_key'] = u.arrayBufferToBase64(identity_keypair.pubKey); return libsignal.KeyHelper.generateSignedPreKey(identity_keypair, 1); }).then(signed_prekey => { _converse.omemo_store.storeSignedPreKey(signed_prekey.keyId, signed_prekey.keyPair);