Sfoglia il codice sorgente

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

tags/v0.0.2
bgrozev 2 anni fa
parent
commit
e0da464b2a
Nessun account collegato all'indirizzo email del committer
1 ha cambiato i file con 7 aggiunte e 1 eliminazioni
  1. 7
    1
      modules/xmpp/moderator.js

+ 7
- 1
modules/xmpp/moderator.js Vedi File

@@ -1,7 +1,7 @@
1 1
 /* eslint-disable newline-per-chained-call */
2 2
 import { getLogger } from '@jitsi/logger';
3 3
 import $ from 'jquery';
4
-import { $iq } from 'strophe.js';
4
+import { $iq, Strophe } from 'strophe.js';
5 5
 
6 6
 import Settings from '../settings/Settings';
7 7
 
@@ -434,6 +434,12 @@ Moderator.prototype._handleIqError = function(error, callback) {
434 434
     // Not authorized to create new room
435 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 443
     this._handleError(invalidSession, notAuthorized, callback);
438 444
 };
439 445
 

Loading…
Annulla
Salva