Selaa lähdekoodia

fix: Bring back code setting externalAuthEnabled. (#2207)

tags/v0.0.2
bgrozev 2 vuotta sitten
vanhempi
commit
e0da464b2a
No account linked to committer's email address
1 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. 7
    1
      modules/xmpp/moderator.js

+ 7
- 1
modules/xmpp/moderator.js Näytä tiedosto

1
 /* eslint-disable newline-per-chained-call */
1
 /* eslint-disable newline-per-chained-call */
2
 import { getLogger } from '@jitsi/logger';
2
 import { getLogger } from '@jitsi/logger';
3
 import $ from 'jquery';
3
 import $ from 'jquery';
4
-import { $iq } from 'strophe.js';
4
+import { $iq, Strophe } from 'strophe.js';
5
 
5
 
6
 import Settings from '../settings/Settings';
6
 import Settings from '../settings/Settings';
7
 
7
 
434
     // Not authorized to create new room
434
     // Not authorized to create new room
435
     const notAuthorized = $(error).find('>error>not-authorized').length > 0;
435
     const notAuthorized = $(error).find('>error>not-authorized').length > 0;
436
 
436
 
437
+    if (notAuthorized && Strophe.getDomainFromJid(error.getAttribute('to')) !== this.options.hosts.anonymousdomain) {
438
+        // FIXME "is external" should come either from the focus or
439
+        // config.js
440
+        this.externalAuthEnabled = true;
441
+    }
442
+
437
     this._handleError(invalidSession, notAuthorized, callback);
443
     this._handleError(invalidSession, notAuthorized, callback);
438
 };
444
 };
439
 
445
 

Loading…
Peruuta
Tallenna