Use just the timestamp for story expiration

This commit is contained in:
Josh Perez 2022-08-17 13:56:41 -04:00 committed by GitHub
parent 16222f6092
commit 5ec78374d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 15 deletions

View file

@ -1949,9 +1949,7 @@ export default class MessageReceiver
}
const expireTimer = Math.min(
Math.floor(
(envelope.serverTimestamp + durations.DAY - Date.now()) / 1000
),
Math.floor((envelope.timestamp + durations.DAY - Date.now()) / 1000),
durations.DAY / 1000
);
@ -1964,7 +1962,7 @@ export default class MessageReceiver
return;
}
const message = {
const message: ProcessedDataMessage = {
attachments,
canReplyToStory: Boolean(msg.allowsReplies),
expireTimer,