From 2cea499736d8a8896aab0882d8c279aa814a7cac Mon Sep 17 00:00:00 2001 From: lilia Date: Mon, 18 Jul 2016 16:11:55 -0700 Subject: [PATCH] Reduce log noise from prekey messages // FREEBIE --- js/libtextsecure.js | 4 ++-- libtextsecure/message_receiver.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 5df14b16e34f..d3dc474c85d8 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -38001,7 +38001,6 @@ MessageReceiver.prototype.extend({ return this.onDeliveryReceipt(envelope); } - console.log('envelope from', envelope.source + '.' + envelope.sourceDevice, envelope.timestamp.toNumber()); if (envelope.content) { return this.handleContentMessage(envelope); } else if (envelope.legacyMessage) { @@ -38044,10 +38043,11 @@ MessageReceiver.prototype.extend({ var sessionCipher = new libsignal.SessionCipher(textsecure.storage.protocol, address); switch(envelope.type) { case textsecure.protobuf.Envelope.Type.CIPHERTEXT: + console.log('message from', envelope.source + '.' + envelope.sourceDevice, envelope.timestamp.toNumber()); promise = sessionCipher.decryptWhisperMessage(ciphertext).then(this.unpad); break; case textsecure.protobuf.Envelope.Type.PREKEY_BUNDLE: - console.log('prekey whisper message'); + console.log('prekey message from', envelope.source + '.' + envelope.sourceDevice, envelope.timestamp.toNumber()); promise = this.decryptPreKeyWhisperMessage(ciphertext, sessionCipher, address); break; default: diff --git a/libtextsecure/message_receiver.js b/libtextsecure/message_receiver.js index 2f2b1e21de0b..5fed062aa1da 100644 --- a/libtextsecure/message_receiver.js +++ b/libtextsecure/message_receiver.js @@ -89,7 +89,6 @@ MessageReceiver.prototype.extend({ return this.onDeliveryReceipt(envelope); } - console.log('envelope from', envelope.source + '.' + envelope.sourceDevice, envelope.timestamp.toNumber()); if (envelope.content) { return this.handleContentMessage(envelope); } else if (envelope.legacyMessage) { @@ -132,10 +131,11 @@ MessageReceiver.prototype.extend({ var sessionCipher = new libsignal.SessionCipher(textsecure.storage.protocol, address); switch(envelope.type) { case textsecure.protobuf.Envelope.Type.CIPHERTEXT: + console.log('message from', envelope.source + '.' + envelope.sourceDevice, envelope.timestamp.toNumber()); promise = sessionCipher.decryptWhisperMessage(ciphertext).then(this.unpad); break; case textsecure.protobuf.Envelope.Type.PREKEY_BUNDLE: - console.log('prekey whisper message'); + console.log('prekey message from', envelope.source + '.' + envelope.sourceDevice, envelope.timestamp.toNumber()); promise = this.decryptPreKeyWhisperMessage(ciphertext, sessionCipher, address); break; default: