Browse Source

Merge pull request #357 from jitsi/fix-connect

Tries to fix connecting after XMPP authentication is requested.
master
bgrozev 9 years ago
parent
commit
9c4b69a1ba
2 changed files with 3 additions and 6 deletions
  1. 2
    5
      modules/UI/UI.js
  2. 1
    1
      modules/xmpp/xmpp.js

+ 2
- 5
modules/UI/UI.js View File

@@ -311,12 +311,9 @@ function registerListeners() {
311 311
     APP.xmpp.addListener(XMPPEvents.CREATE_ANSWER_ERROR, function () {
312 312
         messageHandler.showError();
313 313
     });
314
-    APP.xmpp.addListener(XMPPEvents.PROMPT_FOR_LOGIN, function () {
314
+    APP.xmpp.addListener(XMPPEvents.PROMPT_FOR_LOGIN, function (callback) {
315 315
         // FIXME: re-use LoginDialog which supports retries
316
-        // FIXME^2: This looks like a bug...connect is undefined.
317
-        /* jshint -W117 */
318
-        UI.showLoginPopup(connect);
319
-        /* jshint +W117 */
316
+        UI.showLoginPopup(callback);
320 317
     });
321 318
 
322 319
     APP.xmpp.addListener(XMPPEvents.FOCUS_DISCONNECTED, function (focusComponent, retrySec) {

+ 1
- 1
modules/xmpp/xmpp.js View File

@@ -306,7 +306,7 @@ var XMPP = {
306 306
         return Strophe.getStatusString(status);
307 307
     },
308 308
     promptLogin: function () {
309
-        eventEmitter.emit(XMPPEvents.PROMPT_FOR_LOGIN);
309
+        eventEmitter.emit(XMPPEvents.PROMPT_FOR_LOGIN, connect);
310 310
     },
311 311
     joinRoom: function(roomName, useNicks, nick) {
312 312
         var roomjid = roomName;

Loading…
Cancel
Save