Parcourir la source

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

dev1
bgrozev il y a 2 ans
Parent
révision
e0da464b2a
Aucun compte lié à l'adresse e-mail de l'auteur
1 fichiers modifiés avec 7 ajouts et 1 suppressions
  1. 7
    1
      modules/xmpp/moderator.js

+ 7
- 1
modules/xmpp/moderator.js Voir le fichier

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
 

Chargement…
Annuler
Enregistrer