fix(worker): get correct profile id for session end

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-10-06 21:07:56 +02:00
parent a831081b2d
commit 2a9f7bbe4f

View File

@@ -150,6 +150,7 @@ export async function createSessionEnd(
name: 'session_end',
duration: sessionDuration,
path: screenViews[0]?.path ?? '',
createdAt: new Date(getTime(lastEvent?.createdAt) + 100),
createdAt: new Date(getTime(lastEvent.createdAt) + 1000),
profileId: lastEvent.profileId || sessionStart.profileId,
});
}