Disable ratcheting

The auto ratcheting sets the keys and so looks like it can clobber
us setting a key from the app if they race, so just disable it, at
least for now - we aren't using it.
This commit is contained in:
David Baker
2023-10-19 16:50:29 +01:00
parent 550315e8d7
commit 22ef625b55

View File

@@ -24,6 +24,10 @@ import {
export class MatrixKeyProvider extends BaseKeyProvider {
private rtcSession?: MatrixRTCSession;
public constructor() {
super({ ratchetWindowSize: 0 });
}
public setRTCSession(rtcSession: MatrixRTCSession): void {
if (this.rtcSession) {
this.rtcSession.off(
@@ -63,7 +67,7 @@ export class MatrixKeyProvider extends BaseKeyProvider {
);
logger.debug(
`Embedded-E2EE-LOG onEncryptionKeyChanged participantId=${participantId} encryptionKeyIndex=${encryptionKeyIndex} encryptionKey=${encryptionKey}`,
`Embedded-E2EE-LOG onEncryptionKeyChanged room=${this.rtcSession?.room.roomId} participantId=${participantId} encryptionKeyIndex=${encryptionKeyIndex} encryptionKey=${encryptionKey}`,
this.getKeys(),
);
};