Procházet zdrojové kódy

Merge pull request #499 from isymchych/fix-auth-dialog

fix authentication dialog
j8
Paweł Domas před 9 roky
rodič
revize
61b28fccf2
2 změnil soubory, kde provedl 10 přidání a 5 odebrání
  1. 2
    1
      conference.js
  2. 8
    4
      modules/UI/authentication/AuthHandler.js

+ 2
- 1
conference.js Zobrazit soubor

@@ -193,7 +193,8 @@ class ConferenceConnector {
193 193
             }, 5000);
194 194
 
195 195
             // notify user that auth is required
196
-            AuthHandler.requireAuth(APP.conference.roomName);
196
+
197
+            AuthHandler.requireAuth(room, roomLocker.password);
197 198
             break;
198 199
 
199 200
         case ConferenceErrors.RESERVATION_ERROR:

+ 8
- 4
modules/UI/authentication/AuthHandler.js Zobrazit soubor

@@ -54,7 +54,9 @@ function doXmppAuth (room, lockPassword) {
54 54
         // 4. reallocate focus in current room
55 55
         openConnection({id, password}).then(function (connection) {
56 56
             // open room
57
-            let newRoom = connection.initJitsiConference(room.getName());
57
+            let newRoom = connection.initJitsiConference(
58
+                room.getName(), APP.conference._getConferenceOptions()
59
+            );
58 60
 
59 61
             loginDialog.displayConnectionStatus(
60 62
                 APP.translation.translateString('connection.FETCH_SESSION_ID')
@@ -105,20 +107,22 @@ function authenticate (room, lockPassword) {
105 107
     if (room.isExternalAuthEnabled()) {
106 108
         doExternalAuth(room, lockPassword);
107 109
     } else {
108
-        doXmppAuth();
110
+        doXmppAuth(room, lockPassword);
109 111
     }
110 112
 }
111 113
 
112 114
 /**
113 115
  * Notify user that authentication is required to create the conference.
116
+ * @param {JitsiConference} room
117
+ * @param {string} [lockPassword] password to use if the conference is locked
114 118
  */
115
-function requireAuth(roomName) {
119
+function requireAuth(room, lockPassword) {
116 120
     if (authRequiredDialog) {
117 121
         return;
118 122
     }
119 123
 
120 124
     authRequiredDialog = LoginDialog.showAuthRequiredDialog(
121
-        roomName, authenticate
125
+        room.getName(), authenticate.bind(null, room, lockPassword)
122 126
     );
123 127
 }
124 128
 

Načítá se…
Zrušit
Uložit