Fix timestamps on call history message updating

This commit is contained in:
Jamie Kyle 2023-09-13 13:39:07 -07:00 committed by GitHub
parent fc34cd88b8
commit 6cc25fe9e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -832,10 +832,13 @@ async function updateLocalCallHistory(
id: prevMessage?.id ?? generateGuid(),
conversationId: conversation.id,
type: 'call-history',
sent_at: callHistory.timestamp,
timestamp: callHistory.timestamp,
received_at: receivedAtCounter ?? incrementMessageCounter(),
received_at_ms: callHistory.timestamp,
timestamp: prevMessage?.timestamp ?? callHistory.timestamp,
sent_at: prevMessage?.sent_at ?? callHistory.timestamp,
received_at:
prevMessage?.received_at ??
receivedAtCounter ??
incrementMessageCounter(),
received_at_ms: prevMessage?.received_at_ms ?? callHistory.timestamp,
readStatus,
seenStatus,
callId: callHistory.callId,