@@ -6,7 +6,7 @@ import { safeGetRetryAfterMs } from "../http-api/errors.ts";
6
6
import { type CallMembership } from "./CallMembership.ts" ;
7
7
import { type KeyTransportEventListener , KeyTransportEvents , type IKeyTransport } from "./IKeyTransport.ts" ;
8
8
import { isMyMembership , type Statistics } from "./types.ts" ;
9
- import { RoomAndToDeviceEvents , RoomAndToDeviceTransport } from "./ToDeviceAndRoomKeyTransport .ts" ;
9
+ import { RoomAndToDeviceEvents , RoomAndToDeviceTransport } from "./RoomAndToDeviceKeyTransport .ts" ;
10
10
11
11
/**
12
12
* This interface is for testing and for making it possible to interchange the encryption manager.
@@ -106,9 +106,9 @@ export class EncryptionManager implements IEncryptionManager {
106
106
this . manageMediaKeys = this . joinConfig ?. manageMediaKeys ?? this . manageMediaKeys ;
107
107
108
108
this . transport . on ( KeyTransportEvents . ReceivedKeys , this . onNewKeyReceived ) ;
109
- if ( this . transport instanceof RoomAndToDeviceTransport )
109
+ if ( this . transport instanceof RoomAndToDeviceTransport ) {
110
110
this . transport . on ( RoomAndToDeviceEvents . EnabledTransportsChanged , this . onTransportChanged ) ;
111
-
111
+ }
112
112
this . transport . start ( ) ;
113
113
if ( this . joinConfig ?. manageMediaKeys ) {
114
114
this . makeNewSenderKey ( ) ;
@@ -126,8 +126,9 @@ export class EncryptionManager implements IEncryptionManager {
126
126
// as they may still be using the same ones.
127
127
this . encryptionKeys . set ( getParticipantId ( this . userId , this . deviceId ) , [ ] ) ;
128
128
this . transport . off ( KeyTransportEvents . ReceivedKeys , this . onNewKeyReceived ) ;
129
- if ( this . transport instanceof RoomAndToDeviceTransport )
129
+ if ( this . transport instanceof RoomAndToDeviceTransport ) {
130
130
this . transport . off ( RoomAndToDeviceEvents . EnabledTransportsChanged , this . onTransportChanged ) ;
131
+ }
131
132
this . transport . stop ( ) ;
132
133
133
134
if ( this . makeNewKeyTimeout !== undefined ) {
0 commit comments