Removes the XMPP ROOM_CONNECT_ERROR and related code, as it is

ultimately handled the same was as ROOM_JOIN_ERROR.
This commit is contained in:
Boris Grozev 2015-08-17 15:40:52 -05:00
parent 5fc868ee96
commit d84e69c435
3 changed files with 12 additions and 15 deletions

View File

@ -315,10 +315,6 @@ function registerListeners() {
UI.messageHandler.openReportDialog(null,
"dialog.joinError", pres);
});
APP.xmpp.addListener(XMPPEvents.ROOM_CONNECT_ERROR, function (pres) {
UI.messageHandler.openReportDialog(null,
"dialog.connectError", pres);
});
APP.xmpp.addListener(XMPPEvents.READY_TO_JOIN, function () {
var roomName = UI.generateRoomName();

View File

@ -319,7 +319,9 @@ module.exports = function(XMPP, eventEmitter) {
eventEmitter.emit(XMPPEvents.PASSWORD_REQUIRED, function (value) {
self.doJoin(from, value);
});
} else if ($(pres).find(
}
/*
else if ($(pres).find(
'>error[type="cancel"]>not-allowed[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]').length) {
var toDomain = Strophe.getDomainFromJid(pres.getAttribute('to'));
if (toDomain === config.hosts.anonymousdomain) {
@ -329,15 +331,13 @@ module.exports = function(XMPP, eventEmitter) {
// domains or something is wrong.
// XMPP.promptLogin();
eventEmitter.emit(XMPPEvents.ROOM_JOIN_ERROR, pres);
} else {
console.warn('onPresError ', pres);
eventEmitter.emit(XMPPEvents.ROOM_CONNECT_ERROR, pres);
}
} else {
console.warn('onPresError ', pres);
eventEmitter.emit(XMPPEvents.ROOM_CONNECT_ERROR, pres);
}
*/
else {
console.warn('onPresError ', pres);
eventEmitter.emit(XMPPEvents.ROOM_JOIN_ERROR, pres);
}
return true;
},
sendMessage: function (body, nickname) {

View File

@ -61,6 +61,9 @@ var XMPPEvents = {
// Designates an event indicating that we should join the conference with
// audio and/or video muted.
START_MUTED_FROM_FOCUS: "xmpp.start_muted_from_focus",
// Designates an event indicating that there was an error joining the XMPP
// MUC.
ROOM_JOIN_ERROR: 'xmpp.room_join_error',
PEERCONNECTION_READY: "xmpp.peerconnection_ready",
@ -84,8 +87,6 @@ var XMPPEvents = {
JINGLE_FATAL_ERROR: 'xmpp.jingle_fatal_error',
PROMPT_FOR_LOGIN: 'xmpp.prompt_for_login',
FOCUS_DISCONNECTED: 'xmpp.focus_disconnected',
ROOM_JOIN_ERROR: 'xmpp.room_join_error',
ROOM_CONNECT_ERROR: 'xmpp.room_connect_error',
// xmpp is connected and obtained user media
READY_TO_JOIN: 'xmpp.ready_to_join'
};