Ver código fonte

Prefer main domain if 'token' option was specified

master
paweldomas 9 anos atrás
pai
commit
5aa32d2d00
1 arquivos alterados com 3 adições e 1 exclusões
  1. 3
    1
      modules/xmpp/xmpp.js

+ 3
- 1
modules/xmpp/xmpp.js Ver arquivo

@@ -222,8 +222,10 @@ XMPP.prototype.connect = function (jid, password) {
222 222
         var configDomain
223 223
             = this.options.hosts.anonymousdomain || this.options.hosts.domain;
224 224
         // Force authenticated domain if room is appended with '?login=true'
225
+        // or if we're joining with the token
225 226
         if (this.options.hosts.anonymousdomain
226
-                && window.location.search.indexOf("login=true") !== -1) {
227
+                && (window.location.search.indexOf("login=true") !== -1
228
+                    || this.options.token)) {
227 229
             configDomain = this.options.hosts.domain;
228 230
         }
229 231
         jid = configDomain || window.location.hostname;

Carregando…
Cancelar
Salvar