diff --git a/src/matrixrtc/MatrixRTCSession.ts b/src/matrixrtc/MatrixRTCSession.ts index 86f53bc94..faf7acc65 100644 --- a/src/matrixrtc/MatrixRTCSession.ts +++ b/src/matrixrtc/MatrixRTCSession.ts @@ -578,7 +578,7 @@ export class MatrixRTCSession extends TypedEventEmitter m.sender === this.client.getUserId() && m.deviceId === this.client.getDeviceId(); - if (this.isJoined() && this.makeNewKeyTimeout === undefined) { + if (this.manageMediaKeys && this.isJoined() && this.makeNewKeyTimeout === undefined) { const oldMebershipIds = new Set( oldMemberships.filter((m) => !isMyMembership(m)).map(getParticipantIdFromMembership), ); @@ -782,6 +782,8 @@ export class MatrixRTCSession extends TypedEventEmitter { + if (!this.manageMediaKeys) return; + this.makeNewKeyTimeout = undefined; logger.info("Making new sender key for key rotation"); this.makeNewSenderKey(true);