Use timestamp instead of full model for tap-to-view age outs
This commit is contained in:
parent
80da8bb47b
commit
f3e207d0b0
4 changed files with 15 additions and 30 deletions
|
@ -50,16 +50,11 @@
|
|||
const HOUR = 60 * MINUTE;
|
||||
const THIRTY_DAYS = 30 * 24 * HOUR;
|
||||
|
||||
const toAgeOut = await window.Signal.Data.getNextTapToViewMessageToAgeOut({
|
||||
Message: Whisper.Message,
|
||||
});
|
||||
|
||||
if (!toAgeOut) {
|
||||
const receivedAt = await window.Signal.Data.getNextTapToViewMessageTimestampToAgeOut();
|
||||
if (!receivedAt) {
|
||||
return;
|
||||
}
|
||||
|
||||
const receivedAt =
|
||||
toAgeOut.get('received_at_ms') || toAgeOut.get('received_at');
|
||||
const nextCheck = receivedAt + THIRTY_DAYS;
|
||||
|
||||
Whisper.TapToViewMessagesListener.nextCheck = nextCheck;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue