@@ -631,19 +631,17 @@ export class MatrixCall extends TypedEventEmitter<CallEvent, CallEventHandlerMap
631
631
if ( ! this . client . getUseE2eForGroupCall ( ) ) return ;
632
632
// It's possible to want E2EE and yet not have the means to manage E2EE
633
633
// ourselves (for example if the client is a RoomWidgetClient)
634
- if ( ! this . client . isCryptoEnabled ( ) ) {
634
+ if ( ! this . client . getCrypto ( ) ) {
635
635
// All we know is the device ID
636
636
this . opponentDeviceInfo = new DeviceInfo ( this . opponentDeviceId ) ;
637
637
return ;
638
638
}
639
- // if we've got to this point, we do want to init crypto, so throw if we can't
640
- if ( ! this . client . crypto ) throw new Error ( "Crypto is not initialised." ) ;
641
-
642
639
const userId = this . invitee || this . getOpponentMember ( ) ?. userId ;
643
640
644
641
if ( ! userId ) throw new Error ( "Couldn't find opponent user ID to init crypto" ) ;
645
642
646
- const deviceInfoMap = await this . client . crypto . deviceList . downloadKeys ( [ userId ] , false ) ;
643
+ // Here we were calling `MatrixClient.crypto.deviceList.downloadKeys` which is not supported by the rust cryptography.
644
+ const deviceInfoMap = new Map ( ) ;
647
645
this . opponentDeviceInfo = deviceInfoMap . get ( userId ) ?. get ( this . opponentDeviceId ) ;
648
646
if ( this . opponentDeviceInfo === undefined ) {
649
647
throw new GroupCallUnknownDeviceError ( userId ) ;
@@ -2516,18 +2514,7 @@ export class MatrixCall extends TypedEventEmitter<CallEvent, CallEventHandlerMap
2516
2514
return ;
2517
2515
}
2518
2516
2519
- await this . client . encryptAndSendToDevices (
2520
- [
2521
- {
2522
- userId,
2523
- deviceInfo : this . opponentDeviceInfo ,
2524
- } ,
2525
- ] ,
2526
- {
2527
- type : eventType ,
2528
- content,
2529
- } ,
2530
- ) ;
2517
+ // Here we were calling `MatrixClient.encryptAndSendToDevices` which is not supported by the rust cryptography.
2531
2518
} else {
2532
2519
await this . client . sendToDevice (
2533
2520
eventType ,
0 commit comments