Ensure message expire timer start times are never in the future
This commit is contained in:
parent
f3bd0cf903
commit
71d873ccfe
2 changed files with 7 additions and 3 deletions
|
@ -720,6 +720,7 @@
|
|||
|
||||
function createSentMessage(data) {
|
||||
const now = Date.now();
|
||||
|
||||
return new Whisper.Message({
|
||||
source: textsecure.storage.user.getNumber(),
|
||||
sourceDevice: data.device,
|
||||
|
@ -728,7 +729,9 @@
|
|||
conversationId: data.destination,
|
||||
type: 'outgoing',
|
||||
sent: true,
|
||||
expirationStartTimestamp: data.expirationStartTimestamp,
|
||||
expirationStartTimestamp: data.expirationStartTimestamp
|
||||
? Math.min(data.expirationStartTimestamp, Date.now())
|
||||
: null,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue