Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(conference): API left event.

Hristo Terezovd01cfc8466c2
diff --git a/conference.js b/conference.js
index 9a523ab675..d401d7e16b 100644
--- a/conference.js
+++ b/conference.js
@@ -488,10 +488,13 @@ class ConferenceConnector {
* call in hangup() to resolve when all operations are finished.
*/
function disconnect() {
- connection.disconnect();
- APP.API.notifyConferenceLeft(APP.conference.roomName);
+ const onDisconnected = () => {
+ APP.API.notifyConferenceLeft(APP.conference.roomName);
- return Promise.resolve();
+ return Promise.resolve();
+ };
+
+ return connection.disconnect().then(onDisconnected, onDisconnected);
}
/**
@@ -2603,8 +2606,7 @@ export default {
leaveRoomAndDisconnect() {
APP.store.dispatch(conferenceWillLeave(room));
- return room.leave()
- .then(disconnect, disconnect);
+ return room.leave().then(disconnect, disconnect);
},
/**