only verify the prekey id when there is no current session active

pull/183/head
sachaaaaa 7 years ago
parent 2755ff06d8
commit fdc51e88dd

@ -731,15 +731,17 @@ MessageReceiver.prototype.extend({
window.log.info('prekey message from', this.getEnvelopeId(envelope)); window.log.info('prekey message from', this.getEnvelopeId(envelope));
promise = captureActiveSession(sessionCipher) promise = captureActiveSession(sessionCipher)
.then(async () => { .then(async () => {
try { if (!this.activeSessionBaseKey) {
const buffer = dcodeIO.ByteBuffer.wrap(ciphertext); try {
await window.libloki.storage.verifyFriendRequestAcceptPreKey( const buffer = dcodeIO.ByteBuffer.wrap(ciphertext);
envelope.source, await window.libloki.storage.verifyFriendRequestAcceptPreKey(
buffer envelope.source,
); buffer
} catch (e) { );
await this.removeFromCache(envelope); } catch (e) {
throw e; await this.removeFromCache(envelope);
throw e;
}
} }
return this.decryptPreKeyWhisperMessage( return this.decryptPreKeyWhisperMessage(
ciphertext, ciphertext,

Loading…
Cancel
Save