mirror of
https://github.com/vector-im/element-call.git
synced 2026-04-03 07:10:26 +00:00
@@ -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
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user