mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-29 21:15:19 +00:00
@@ -41,25 +41,20 @@ export class MatrixKeyProvider extends BaseKeyProvider {
|
|||||||
for (const [
|
for (const [
|
||||||
participant,
|
participant,
|
||||||
encryptionKey,
|
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,
|
// The new session could be aware of keys of which the old session wasn't,
|
||||||
// so emit a key changed event.
|
// so emit a key changed event.
|
||||||
this.onEncryptionKeyChanged(
|
this.onEncryptionKeyChanged(encryptionKey, participant);
|
||||||
encryptionKey,
|
|
||||||
participant.userId,
|
|
||||||
participant.deviceId
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private onEncryptionKeyChanged = async (
|
private onEncryptionKeyChanged = async (
|
||||||
encryptionKey: string,
|
encryptionKey: string,
|
||||||
userId: string,
|
participantId: string
|
||||||
deviceId: string
|
|
||||||
) => {
|
) => {
|
||||||
this.onSetEncryptionKey(
|
this.onSetEncryptionKey(
|
||||||
await createKeyMaterialFromString(encryptionKey),
|
await createKeyMaterialFromString(encryptionKey),
|
||||||
`${userId}:${deviceId}`
|
participantId
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user