Skip to content

Commit 60e298a

Browse files
committed
add dirty flag to session
1 parent 0d03553 commit 60e298a

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

packages/replay-internal/src/replay.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,7 @@ export class ReplayContainer implements ReplayContainerInterface {
606606

607607
// Once this session ends, we do not want to refresh it
608608
if (this.session) {
609+
this.session.dirty = false;
609610
this._updateUserActivity(activityTime);
610611
this._updateSessionActivity(activityTime);
611612
this._maybeSaveSession();

packages/replay-internal/src/session/Session.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export function makeSession(session: Partial<Session> & { sampled: Sampled }): S
1313
const segmentId = session.segmentId || 0;
1414
const sampled = session.sampled;
1515
const previousSessionId = session.previousSessionId;
16+
const dirty = session.dirty || false;
1617

1718
return {
1819
id,
@@ -21,5 +22,6 @@ export function makeSession(session: Partial<Session> & { sampled: Sampled }): S
2122
segmentId,
2223
sampled,
2324
previousSessionId,
25+
dirty,
2426
};
2527
}

0 commit comments

Comments
 (0)