From a307efe518c1cba718f459146d90a49f517be757 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Sun, 24 Mar 2024 22:20:53 +0000 Subject: [PATCH] make the tests pass --- .../src/main/ingestion-queues/session-recording/utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin-server/src/main/ingestion-queues/session-recording/utils.ts b/plugin-server/src/main/ingestion-queues/session-recording/utils.ts index b72e12dbdf286..2c5637726743e 100644 --- a/plugin-server/src/main/ingestion-queues/session-recording/utils.ts +++ b/plugin-server/src/main/ingestion-queues/session-recording/utils.ts @@ -6,6 +6,7 @@ import path from 'path' import { KAFKA_SESSION_RECORDING_SNAPSHOT_ITEM_EVENTS } from '../../../config/kafka-topics' import { PipelineEvent, RawEventMessage, RRWebEvent } from '../../../types' import { status } from '../../../utils/status' +import { cloneObject } from '../../../utils/utils' import { eventDroppedCounter } from '../metrics' import { TeamIDWithConfig } from './session-recordings-consumer' import { IncomingRecordingMessage, PersistedRecordingMessage } from './types' @@ -256,7 +257,7 @@ export const reduceRecordingMessages = (messages: IncomingRecordingMessage[]): I for (const message of messages) { const key = `${message.team_id}-${message.session_id}` if (!reducedMessages[key]) { - reducedMessages[key] = message + reducedMessages[key] = cloneObject(message) } else { const existingMessage = reducedMessages[key] for (const [windowId, events] of Object.entries(message.eventsByWindowId)) {