Use read receipt envelope to infer startExpirationTime
Avoids display of phantom messages that are only received and marked read locally long after they have expired on another linked device.
This commit is contained in:
@@ -247,10 +247,15 @@
|
||||
}
|
||||
|
||||
function onReadReceipt(ev) {
|
||||
var timestamp = ev.timestamp.toNumber();
|
||||
var sender = ev.sender;
|
||||
var read_at = ev.timestamp;
|
||||
var timestamp = ev.read.timestamp;
|
||||
var sender = ev.read.sender;
|
||||
console.log('read receipt ', sender, timestamp);
|
||||
Whisper.ReadReceipts.add({sender: sender, timestamp: timestamp});
|
||||
Whisper.ReadReceipts.add({
|
||||
sender : sender,
|
||||
timestamp : timestamp,
|
||||
read_at : read_at
|
||||
});
|
||||
}
|
||||
|
||||
// lazy hack
|
||||
|
Reference in New Issue
Block a user