fix: use envelope time when dont have msg request response timestamp

pull/2668/head
Audric Ackermann 2 years ago
parent 319e66f78c
commit d2d2a418eb

@ -626,11 +626,9 @@ async function handleMessageRequestResponse(
unblindedConvoId,
ConversationTypeEnum.PRIVATE
);
let mostRecentActiveAt =
Math.max(...compact(convosToMerge.map(m => m.get('active_at')))) || Date.now();
if (!isFinite(mostRecentActiveAt)) {
mostRecentActiveAt = Date.now();
let mostRecentActiveAt = Math.max(...compact(convosToMerge.map(m => m.get('active_at'))));
if (!isFinite(mostRecentActiveAt) || mostRecentActiveAt <= 0) {
mostRecentActiveAt = toNumber(envelope.timestamp);
}
conversationToApprove.set({

Loading…
Cancel
Save