From 745417be18d0592d3128bd8041fe18b3611edcb8 Mon Sep 17 00:00:00 2001 From: Boris Grozev Date: Mon, 14 Sep 2015 16:06:58 -0500 Subject: [PATCH] Tries to fix connecting after XMPP authentication is requested. --- modules/UI/UI.js | 7 ++----- modules/xmpp/xmpp.js | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/UI/UI.js b/modules/UI/UI.js index 377fd098d..2164e8e0d 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -311,12 +311,9 @@ function registerListeners() { APP.xmpp.addListener(XMPPEvents.CREATE_ANSWER_ERROR, function () { messageHandler.showError(); }); - APP.xmpp.addListener(XMPPEvents.PROMPT_FOR_LOGIN, function () { + APP.xmpp.addListener(XMPPEvents.PROMPT_FOR_LOGIN, function (callback) { // FIXME: re-use LoginDialog which supports retries - // FIXME^2: This looks like a bug...connect is undefined. - /* jshint -W117 */ - UI.showLoginPopup(connect); - /* jshint +W117 */ + UI.showLoginPopup(callback); }); APP.xmpp.addListener(XMPPEvents.FOCUS_DISCONNECTED, function (focusComponent, retrySec) { diff --git a/modules/xmpp/xmpp.js b/modules/xmpp/xmpp.js index 701406447..5b7abcfc8 100644 --- a/modules/xmpp/xmpp.js +++ b/modules/xmpp/xmpp.js @@ -306,7 +306,7 @@ var XMPP = { return Strophe.getStatusString(status); }, promptLogin: function () { - eventEmitter.emit(XMPPEvents.PROMPT_FOR_LOGIN); + eventEmitter.emit(XMPPEvents.PROMPT_FOR_LOGIN, connect); }, joinRoom: function(roomName, useNicks, nick) { var roomjid = roomName;