Read receipts: Log sender and timestamp when related msg not found

FREEBIE
This commit is contained in:
Scott Nonnenberg 2017-07-24 12:27:48 -07:00
parent c6bc167975
commit f38d715250
4 changed files with 9 additions and 6 deletions

View file

@ -338,7 +338,7 @@
var read_at = ev.timestamp;
var timestamp = ev.read.timestamp;
var sender = ev.read.sender;
console.log('read receipt ', sender, timestamp);
console.log('read receipt', sender, timestamp);
var receipt = Whisper.ReadReceipts.add({
sender : sender,
timestamp : timestamp,

View file

@ -38704,8 +38704,8 @@ MessageReceiver.prototype.extend({
ev.confirm = this.removeFromCache.bind(this, envelope);
ev.timestamp = envelope.timestamp.toNumber();
ev.read = {
timestamp : read[i].timestamp.toNumber(),
sender : read[i].sender
timestamp : read[i].timestamp.toNumber(),
sender : read[i].sender
}
this.dispatchEvent(ev);
}

View file

@ -32,7 +32,10 @@
this.remove(receipt);
}.bind(this));
} else {
console.log('No message for read receipt');
console.log(
'No message for read receipt',
receipt.get('sender'), receipt.get('timestamp')
);
}
}.bind(this));
},

View file

@ -465,8 +465,8 @@ MessageReceiver.prototype.extend({
ev.confirm = this.removeFromCache.bind(this, envelope);
ev.timestamp = envelope.timestamp.toNumber();
ev.read = {
timestamp : read[i].timestamp.toNumber(),
sender : read[i].sender
timestamp : read[i].timestamp.toNumber(),
sender : read[i].sender
}
this.dispatchEvent(ev);
}