Restore incoming Signal decryption to fix 'Illegal wire type for field Message.Field .signalservice.Content.preKeyBundleMessage'

This commit is contained in:
sachaaaaa 2018-11-15 09:15:42 +11:00
parent 4a31c1640f
commit 5a428af873

View file

@ -693,10 +693,9 @@ MessageReceiver.prototype.extend({
switch (envelope.type) {
case textsecure.protobuf.Envelope.Type.CIPHERTEXT:
window.log.info('message from', this.getEnvelopeId(envelope));
promise = Promise.resolve(ciphertext.toArrayBuffer()); //;sessionCipher
// TODO: restore decryption & unpadding (?)
//.decryptWhisperMessage(ciphertext)
//.then(this.unpad);
promise = sessionCipher.decryptWhisperMessage(ciphertext);
// TODO: restore unpadding (?)
// .then(this.unpad);
break;
case textsecure.protobuf.Envelope.Type.FRIEND_REQUEST:
window.log.info('friend-request message from ', envelope.source);