Fix disconnection event not propagating to the UI

pull/1/head
yflory 5 years ago
parent a327f4a0bf
commit c4a90a90f2

@ -1188,9 +1188,6 @@ define([
onLeave: function (m) { onLeave: function (m) {
channel.bcast("PAD_LEAVE", m); channel.bcast("PAD_LEAVE", m);
}, },
onAbort: function () {
channel.bcast("PAD_DISCONNECT");
},
onError: function (err) { onError: function (err) {
channel.bcast("PAD_ERROR", err); channel.bcast("PAD_ERROR", err);
delete channels[data.channel]; delete channels[data.channel];
@ -1199,7 +1196,11 @@ define([
channel.bcast("PAD_ERROR", err); channel.bcast("PAD_ERROR", err);
delete channels[data.channel]; delete channels[data.channel];
}, },
onConnectionChange: function () {}, onConnectionChange: function (info) {
if (!info.state) {
channel.bcast("PAD_DISCONNECT");
}
},
crypto: { crypto: {
// The encryption and decryption is done in the outer window. // The encryption and decryption is done in the outer window.
// This async-store only deals with already encrypted messages. // This async-store only deals with already encrypted messages.

@ -575,7 +575,6 @@ MessengerUI, Messages) {
}; };
var createRequest = function (toolbar, config) { var createRequest = function (toolbar, config) {
console.error('test');
if (!config.metadataMgr) { if (!config.metadataMgr) {
throw new Error("You must provide a `metadataMgr` to display the request access button"); throw new Error("You must provide a `metadataMgr` to display the request access button");
} }

Loading…
Cancel
Save