Group story replies: On send, don't set expire timer

This commit is contained in:
Scott Nonnenberg 2023-02-06 18:21:41 -08:00 committed by GitHub
parent 9ce4d32afb
commit 7cbc35c57b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4019,14 +4019,8 @@ export class ConversationModel extends window.Backbone
let expirationStartTimestamp: number | undefined;
let expireTimer: DurationInSeconds | undefined;
// If it's a group story reply then let's match the expiration timers
// with the parent story's expiration.
if (storyId && isGroup(this.attributes)) {
const parentStory = await getMessageById(storyId);
expirationStartTimestamp =
parentStory?.expirationStartTimestamp || Date.now();
expireTimer = parentStory?.expireTimer || DurationInSeconds.DAY;
} else {
// For normal messages and 1:1 story replies, we use the parent conversation's timer
if (!storyId || isDirectConversation(this.attributes)) {
await this.maybeApplyUniversalTimer();
expireTimer = this.get('expireTimer');
}