More logging
// FREEBIE
This commit is contained in:
parent
51fc10abb6
commit
d95f869d62
3 changed files with 11 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue