Преглед на файлове

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

dev1
bgrozev преди 2 години
родител
ревизия
e0da464b2a
No account linked to committer's email address
променени са 1 файла, в които са добавени 7 реда и са изтрити 1 реда
  1. 7
    1
      modules/xmpp/moderator.js

+ 7
- 1
modules/xmpp/moderator.js Целия файл

@@ -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…
Отказ
Запис