From 5862f911bcbacd4d3b355941950ae8d354b6c56e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Mon, 4 Sep 2023 16:56:08 +0200 Subject: [PATCH] Fix map MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/e2ee/matrixKeyProvider.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/e2ee/matrixKeyProvider.ts b/src/e2ee/matrixKeyProvider.ts index afba326a..c4ae66ed 100644 --- a/src/e2ee/matrixKeyProvider.ts +++ b/src/e2ee/matrixKeyProvider.ts @@ -41,25 +41,20 @@ export class MatrixKeyProvider extends BaseKeyProvider { for (const [ participant, encryptionKey, - ] of this.rtcSession.encryptionKeys.entries()) { + ] of this.rtcSession.getEncryptionKeys()) { // The new session could be aware of keys of which the old session wasn't, // so emit a key changed event. - this.onEncryptionKeyChanged( - encryptionKey, - participant.userId, - participant.deviceId - ); + this.onEncryptionKeyChanged(encryptionKey, participant); } } private onEncryptionKeyChanged = async ( encryptionKey: string, - userId: string, - deviceId: string + participantId: string ) => { this.onSetEncryptionKey( await createKeyMaterialFromString(encryptionKey), - `${userId}:${deviceId}` + participantId ); }; }