1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-01 04:43:29 +03:00

BREAKING CHANGE: Fixes for unknown device errors

* If we can't send an invite due to unknown devices, abort the
   call.
 * Don't transition to the `invite_sent` state until the invite
   has actually sent.
 * Add a specific error code for failure due to unknown devices.
 * Don't send ICE candidate messages if the call has ended.
 * Add an `event` property to errors from `sendEvent` so that the
   caller can resend or cancel the event.
This commit is contained in:
David Baker
2017-11-15 10:56:57 +00:00
parent a5dac751b0
commit 8fcf55d761
2 changed files with 34 additions and 7 deletions

View File

@@ -1127,6 +1127,9 @@ function _sendEvent(client, room, event, callback) {
try {
_updatePendingEventStatus(room, event, EventStatus.NOT_SENT);
event.error = err;
// also put the event object on the error: the caller will need this
// to resend or cancel the event
err.event = event;
if (callback) {
callback(err);