From 280f7a74b1016b4e2917b9c015468885213b0d82 Mon Sep 17 00:00:00 2001 From: lilia Date: Tue, 21 Feb 2017 15:00:24 -0800 Subject: [PATCH] Fix key change errors while retrying key change errors --- js/libtextsecure.js | 3 ++- libtextsecure/message_receiver.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 64144bf2..7083996d 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -38358,9 +38358,10 @@ MessageReceiver.prototype.extend({ if (e.message === 'Unknown identity key') { // create an error that the UI will pick up and ask the // user if they want to re-negotiate + var buffer = dcodeIO.ByteBuffer.wrap(ciphertext); throw new textsecure.IncomingIdentityKeyError( address.toString(), - ciphertext.toArrayBuffer(), + buffer.toArrayBuffer(), e.identityKey ); } diff --git a/libtextsecure/message_receiver.js b/libtextsecure/message_receiver.js index 40a2fa77..167c48c7 100644 --- a/libtextsecure/message_receiver.js +++ b/libtextsecure/message_receiver.js @@ -157,9 +157,10 @@ MessageReceiver.prototype.extend({ if (e.message === 'Unknown identity key') { // create an error that the UI will pick up and ask the // user if they want to re-negotiate + var buffer = dcodeIO.ByteBuffer.wrap(ciphertext); throw new textsecure.IncomingIdentityKeyError( address.toString(), - ciphertext.toArrayBuffer(), + buffer.toArrayBuffer(), e.identityKey ); }