You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Only hangup on call errors, not errors on sendEvent
This commit is contained in:
@ -100,18 +100,19 @@ function pause(audioId) {
|
|||||||
|
|
||||||
function _setCallListeners(call) {
|
function _setCallListeners(call) {
|
||||||
call.on("error", function(err) {
|
call.on("error", function(err) {
|
||||||
|
console.error("Call error: %s", err);
|
||||||
|
console.error(err.stack);
|
||||||
|
call.hangup();
|
||||||
|
_setCallState(undefined, call.roomId, "ended");
|
||||||
|
});
|
||||||
|
call.on('send_event_error', function(err) {
|
||||||
if (err.name === "UnknownDeviceError") {
|
if (err.name === "UnknownDeviceError") {
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'unknown_device_error',
|
action: 'unknown_device_error',
|
||||||
err: err,
|
err: err,
|
||||||
room: MatrixClientPeg.get().getRoom(call.roomId),
|
room: MatrixClientPeg.get().getRoom(call.roomId),
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
console.error("Call error: %s", err);
|
|
||||||
console.error(err.stack);
|
|
||||||
}
|
}
|
||||||
call.hangup();
|
|
||||||
_setCallState(undefined, call.roomId, "ended");
|
|
||||||
});
|
});
|
||||||
call.on("hangup", function() {
|
call.on("hangup", function() {
|
||||||
_setCallState(undefined, call.roomId, "ended");
|
_setCallState(undefined, call.roomId, "ended");
|
||||||
|
Reference in New Issue
Block a user