show DOM errors on the member error boundary rather than one for call

gives a bit more context
This commit is contained in:
Bruno Windels 2023-02-07 19:59:13 +01:00
parent 7114428b23
commit 5c2889aa5b
2 changed files with 2 additions and 4 deletions

View File

@ -134,8 +134,7 @@ export class GroupCall extends EventEmitter<{change: never}> {
},
encryptDeviceMessage: (userId: string, deviceId: string, message: SignallingMessage<MGroupCallBase>, log) => {
return this.options.encryptDeviceMessage(this.roomId, userId, deviceId, message, log);
},
groupCallErrorBoundary: this.errorBoundary,
}
});
}

View File

@ -42,7 +42,6 @@ export type Options = Omit<PeerCallOptions, "emitUpdate" | "sendSignallingMessag
hsApi: HomeServerApi,
encryptDeviceMessage: (userId: string, deviceId: string, message: SignallingMessage<MGroupCallBase>, log: ILogItem) => Promise<EncryptedMessage | undefined>,
emitUpdate: (participant: Member, params?: any) => void,
groupCallErrorBoundary: ErrorBoundary,
clock: Clock
}
@ -422,7 +421,7 @@ export class Member {
private _createPeerCall(callId: string): PeerCall {
const connection = this.connection!;
return new PeerCall(callId, Object.assign({}, this.options, {
errorBoundary: this.options.groupCallErrorBoundary,
errorBoundary: this.errorBoundary,
emitUpdate: this.emitUpdateFromPeerCall,
sendSignallingMessage: this.sendSignallingMessage,
turnServer: connection.turnServer