Skip to content

Commit 8ea291a

Browse files
committed
fix todo comment -> note comment
1 parent bd6dda1 commit 8ea291a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/matrixrtc/MatrixRTCSessionManager.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,11 @@ export class MatrixRTCSessionManager extends TypedEventEmitter<MatrixRTCSessionM
119119
const session = this.getRoomSession(room);
120120

121121
const wasActiveAndKnown = session.memberships.length > 0 && !isNewSession;
122-
// TODO: we can move this directly into the rtcSession without any performacn impact.
123-
// Because it is possible to subscribe to state events per room. So each session will just
124-
// subscribe to only a subset of events.
122+
// This needs to be here and the event listener cannot be setup in the MatrixRTCSession,
123+
// because we need the update to happen between:
124+
// wasActiveAndKnown = session.memberships.length > 0 and
125+
// nowActive = session.memberships.length
126+
// Alternatively we would need to setup some event emission when the RTC session ended.
125127
session.onRTCSessionMemberUpdate();
126128

127129
const nowActive = session.memberships.length > 0;

0 commit comments

Comments
 (0)