fix: send sync message with the expireUpdate if provided

pull/2940/head
Audric Ackermann 2 years ago
parent c1222a748d
commit 00f93a2754

@ -294,7 +294,8 @@ const buildSyncVisibleMessage = (
identifier: string, identifier: string,
dataMessage: SignalService.DataMessage, dataMessage: SignalService.DataMessage,
timestamp: number, timestamp: number,
syncTarget: string syncTarget: string,
expireUpdate?: DisappearingMessageUpdate
) => { ) => {
const body = dataMessage.body || undefined; const body = dataMessage.body || undefined;
@ -320,7 +321,7 @@ const buildSyncVisibleMessage = (
}) as Array<AttachmentPointerWithUrl>; }) as Array<AttachmentPointerWithUrl>;
const quote = (dataMessage.quote as Quote) || undefined; const quote = (dataMessage.quote as Quote) || undefined;
const preview = (dataMessage.preview as Array<PreviewWithAttachmentUrl>) || []; const preview = (dataMessage.preview as Array<PreviewWithAttachmentUrl>) || [];
const expireTimer = dataMessage.expireTimer; const dataMessageExpireTimer = dataMessage.expireTimer;
return new VisibleMessage({ return new VisibleMessage({
identifier, identifier,
@ -330,7 +331,8 @@ const buildSyncVisibleMessage = (
quote, quote,
preview, preview,
syncTarget, syncTarget,
expireTimer, expireTimer: expireUpdate?.expirationTimer || dataMessageExpireTimer,
expirationType: expireUpdate?.expirationType,
}); });
}; };
@ -409,7 +411,8 @@ export const buildSyncMessage = (
identifier, identifier,
dataMessage, dataMessage,
timestamp, timestamp,
syncTarget syncTarget,
expireUpdate
); );
return visibleSyncMessage; return visibleSyncMessage;
}; };

Loading…
Cancel
Save