Better logging for sync sent messages, and new (disappeared) msgs

FREEBIE
This commit is contained in:
Scott Nonnenberg 2017-08-03 18:15:47 -07:00
parent ad8cb870d9
commit 92ba295d52
3 changed files with 15 additions and 7 deletions

View file

@ -38698,8 +38698,7 @@ MessageReceiver.prototype.extend({
}
},
handleNullMessage: function(envelope, nullMessage) {
var encodedNumber = envelope.source + '.' + envelope.sourceDevice;
console.log('null message from', encodedNumber, envelope.timestamp.toNumber());
console.log('null message from', encodedNumber, this.getEnvelopeId(envelope));
this.removeFromCache(envelope);
},
handleSyncMessage: function(envelope, syncMessage) {
@ -38714,7 +38713,8 @@ MessageReceiver.prototype.extend({
console.log('sent message to',
sentMessage.destination,
sentMessage.timestamp.toNumber(),
'from', envelope.source + '.' + envelope.sourceDevice
'from',
this.getEnvelopeId(envelope)
);
return this.handleSentMessage(
envelope,

View file

@ -518,7 +518,15 @@
catch (e) {
handleError(e);
}
}, handleError);
}, function(error) {
console.log('handleDataMessage: Message', message.idForLogging(), 'was deleted');
if (confirm) {
confirm();
}
return resolve();
});
}, handleError);
}, handleError);
});

View file

@ -456,8 +456,7 @@ MessageReceiver.prototype.extend({
}
},
handleNullMessage: function(envelope, nullMessage) {
var encodedNumber = envelope.source + '.' + envelope.sourceDevice;
console.log('null message from', encodedNumber, envelope.timestamp.toNumber());
console.log('null message from', encodedNumber, this.getEnvelopeId(envelope));
this.removeFromCache(envelope);
},
handleSyncMessage: function(envelope, syncMessage) {
@ -472,7 +471,8 @@ MessageReceiver.prototype.extend({
console.log('sent message to',
sentMessage.destination,
sentMessage.timestamp.toNumber(),
'from', envelope.source + '.' + envelope.sourceDevice
'from',
this.getEnvelopeId(envelope)
);
return this.handleSentMessage(
envelope,