Skip to content

Commit c9bc20a

Browse files
Don't throw with no opponentDeviceInfo (#3107)
1 parent 5c0cb3a commit c9bc20a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/webrtc/call.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -2335,11 +2335,16 @@ export class MatrixCall extends TypedEventEmitter<CallEvent, CallEventHandlerMap
23352335

23362336
const userId = this.invitee || this.getOpponentMember()!.userId;
23372337
if (this.client.getUseE2eForGroupCall()) {
2338+
if (!this.opponentDeviceInfo) {
2339+
logger.warn(`Call ${this.callId} sendVoipEvent() failed: we do not have opponentDeviceInfo`);
2340+
return;
2341+
}
2342+
23382343
await this.client.encryptAndSendToDevices(
23392344
[
23402345
{
23412346
userId,
2342-
deviceInfo: this.opponentDeviceInfo!,
2347+
deviceInfo: this.opponentDeviceInfo,
23432348
},
23442349
],
23452350
{

0 commit comments

Comments
 (0)