瀏覽代碼

Prefer main domain if 'token' option was specified

master
paweldomas 9 年之前
父節點
當前提交
5aa32d2d00
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      modules/xmpp/xmpp.js

+ 3
- 1
modules/xmpp/xmpp.js 查看文件

@@ -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;

Loading…
取消
儲存