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