Do not set conversation expire timer on incoming story msgs

Co-authored-by: Josh Perez <60019601+josh-signal@users.noreply.github.com>
This commit is contained in:
Scott Nonnenberg 2022-03-21 16:17:54 -07:00 committed by GitHub
parent dda059b7d8
commit 4b051ef243
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -2431,7 +2431,7 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
message.set({ expireTimer: dataMessage.expireTimer });
}
if (!hasGroupV2Prop) {
if (!hasGroupV2Prop && !isStory(message.attributes)) {
if (isExpirationTimerUpdate(message.attributes)) {
message.set({
expirationTimerUpdate: {

View File

@ -1811,7 +1811,10 @@ export default class MessageReceiver
return;
}
const expireTimer = envelope.timestamp + durations.DAY - Date.now();
const expireTimer = Math.min(
(envelope.serverTimestamp + durations.DAY - Date.now()) / 1000,
durations.DAY / 1000
);
if (expireTimer <= 0) {
log.info(