Show UDDialog on m.call.invite failure
Requires https://github.com/matrix-org/matrix-js-sdk/pull/378 Also, refactored UDDialog creation into its own dispatch event, because there will be other parts of the code that will want to spawn one.
This commit is contained in:
parent
05d242cb5c
commit
878e31eba2
5 changed files with 34 additions and 23 deletions
|
@ -100,8 +100,16 @@ function pause(audioId) {
|
|||
|
||||
function _setCallListeners(call) {
|
||||
call.on("error", function(err) {
|
||||
console.error("Call error: %s", err);
|
||||
console.error(err.stack);
|
||||
if (err.name === "UnknownDeviceError") {
|
||||
dis.dispatch({
|
||||
action: 'unknown_device_error',
|
||||
err: err,
|
||||
room: MatrixClientPeg.get().getRoom(call.roomId),
|
||||
});
|
||||
} else {
|
||||
console.error("Call error: %s", err);
|
||||
console.error(err.stack);
|
||||
}
|
||||
call.hangup();
|
||||
_setCallState(undefined, call.roomId, "ended");
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue