diff --git a/js/background.js b/js/background.js index 19ea1f5e8115..8a15b4c6f129 100644 --- a/js/background.js +++ b/js/background.js @@ -38,6 +38,7 @@ ConversationController.updateInbox(); extension.onLaunched(function() { + console.log('extension launched'); storage.onready(function() { if (textsecure.registration.isDone()) { openInbox(); @@ -112,6 +113,7 @@ } function onContactSyncComplete() { + console.log('Contact sync complete'); window.dispatchEvent(new Event('textsecure:contactsync')); } @@ -227,7 +229,7 @@ var timestamp = pushMessage.timestamp.toNumber(); var messages = new Whisper.MessageCollection(); var groups = new Whisper.ConversationCollection(); - console.log('delivery receipt', pushMessage.source, timestamp); + console.log('delivery receipt from', pushMessage.source + '.' + pushMessage.sourceDevice, timestamp); if (pushMessage.source === textsecure.storage.user.getNumber()) { // disregard delivery receipts from myself diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 097e37daee37..2d21b6482bb7 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -36802,8 +36802,6 @@ MessageReceiver.prototype = { // user they received an invalid message request.respond(200, 'OK'); - console.log('envelope', envelope.source + '.' + envelope.sourceDevice, envelope.timestamp); - if (envelope.type === textsecure.protobuf.Envelope.Type.RECEIPT) { return this.onDeliveryReceipt(envelope); } else if (envelope.content) { @@ -36867,6 +36865,7 @@ MessageReceiver.prototype = { }.bind(this)); }, handleDataMessage: function(envelope, message, close_session) { + console.log('data message from', envelope.source + '.' + envelope.sourceDevice, envelope.timestamp.toNumber()); if ((message.flags & textsecure.protobuf.DataMessage.Flags.END_SESSION) == textsecure.protobuf.DataMessage.Flags.END_SESSION ) { close_session(); @@ -36912,6 +36911,7 @@ MessageReceiver.prototype = { } if (syncMessage.sent) { var sentMessage = syncMessage.sent; + console.log('sent message to', sentMessage.destination, envelope.timestamp.toNumber(), 'from', envelope.source + '.' + envelope.sourceDevice); return this.handleSentMessage( sentMessage.destination, sentMessage.timestamp, @@ -36928,6 +36928,7 @@ MessageReceiver.prototype = { } }, handleContacts: function(contacts) { + console.log('contact sync'); var eventTarget = this; var attachmentPointer = contacts.blob; return this.handleAttachment(attachmentPointer).then(function() { @@ -36943,6 +36944,7 @@ MessageReceiver.prototype = { }); }, handleGroups: function(groups) { + console.log('group sync'); var eventTarget = this; var attachmentPointer = groups.blob; return this.handleAttachment(attachmentPointer).then(function() { diff --git a/libtextsecure/message_receiver.js b/libtextsecure/message_receiver.js index 71bdf95927a0..f6e95d39f9bf 100644 --- a/libtextsecure/message_receiver.js +++ b/libtextsecure/message_receiver.js @@ -70,8 +70,6 @@ MessageReceiver.prototype = { // user they received an invalid message request.respond(200, 'OK'); - console.log('envelope', envelope.source + '.' + envelope.sourceDevice, envelope.timestamp); - if (envelope.type === textsecure.protobuf.Envelope.Type.RECEIPT) { return this.onDeliveryReceipt(envelope); } else if (envelope.content) { @@ -135,6 +133,7 @@ MessageReceiver.prototype = { }.bind(this)); }, handleDataMessage: function(envelope, message, close_session) { + console.log('data message from', envelope.source + '.' + envelope.sourceDevice, envelope.timestamp.toNumber()); if ((message.flags & textsecure.protobuf.DataMessage.Flags.END_SESSION) == textsecure.protobuf.DataMessage.Flags.END_SESSION ) { close_session(); @@ -180,6 +179,7 @@ MessageReceiver.prototype = { } if (syncMessage.sent) { var sentMessage = syncMessage.sent; + console.log('sent message to', sentMessage.destination, envelope.timestamp.toNumber(), 'from', envelope.source + '.' + envelope.sourceDevice); return this.handleSentMessage( sentMessage.destination, sentMessage.timestamp, @@ -196,6 +196,7 @@ MessageReceiver.prototype = { } }, handleContacts: function(contacts) { + console.log('contact sync'); var eventTarget = this; var attachmentPointer = contacts.blob; return this.handleAttachment(attachmentPointer).then(function() { @@ -211,6 +212,7 @@ MessageReceiver.prototype = { }); }, handleGroups: function(groups) { + console.log('group sync'); var eventTarget = this; var attachmentPointer = groups.blob; return this.handleAttachment(attachmentPointer).then(function() {