diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 5f10d460ae3..5df14b16e34 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -37997,10 +37997,12 @@ MessageReceiver.prototype.extend({ this.pending = this.pending.then(handleEnvelope, handleEnvelope); }, handleEnvelope: function(envelope) { - console.log('envelope from', envelope.source + '.' + envelope.sourceDevice, envelope.timestamp.toNumber()); if (envelope.type === textsecure.protobuf.Envelope.Type.RECEIPT) { return this.onDeliveryReceipt(envelope); - } else if (envelope.content) { + } + + console.log('envelope from', envelope.source + '.' + envelope.sourceDevice, envelope.timestamp.toNumber()); + if (envelope.content) { return this.handleContentMessage(envelope); } else if (envelope.legacyMessage) { return this.handleLegacyMessage(envelope); diff --git a/libtextsecure/message_receiver.js b/libtextsecure/message_receiver.js index 50bdd3cdbc1..2f2b1e21de0 100644 --- a/libtextsecure/message_receiver.js +++ b/libtextsecure/message_receiver.js @@ -85,10 +85,12 @@ MessageReceiver.prototype.extend({ this.pending = this.pending.then(handleEnvelope, handleEnvelope); }, handleEnvelope: function(envelope) { - console.log('envelope from', envelope.source + '.' + envelope.sourceDevice, envelope.timestamp.toNumber()); if (envelope.type === textsecure.protobuf.Envelope.Type.RECEIPT) { return this.onDeliveryReceipt(envelope); - } else if (envelope.content) { + } + + console.log('envelope from', envelope.source + '.' + envelope.sourceDevice, envelope.timestamp.toNumber()); + if (envelope.content) { return this.handleContentMessage(envelope); } else if (envelope.legacyMessage) { return this.handleLegacyMessage(envelope);