Actually use the given urls
This commit is contained in:
parent
00ce7f60f6
commit
29ec69dfb2
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "otalk.im",
|
||||
"description": "Otalk: WebRTC Enabled XMPP Client, in the Browser",
|
||||
"version": "0.0.32",
|
||||
"version": "0.0.33",
|
||||
"dependencies": {
|
||||
"andlog": "0.0.4",
|
||||
"async": "0.2.9",
|
||||
|
|
|
@ -3,12 +3,15 @@ $('#loginbox form').on('submit', function (e) {
|
|||
var password = $('#password').val();
|
||||
var connURL = $('#connURL').val();
|
||||
|
||||
var transport;
|
||||
var wsURL = '';
|
||||
var boshURL = '';
|
||||
if (connURL.indexOf('http') == 0) {
|
||||
if (connURL.indexOf('http') === 0) {
|
||||
boshURL = connURL;
|
||||
transport = 'bosh';
|
||||
} else {
|
||||
wsURL = wsURL;
|
||||
transport = 'websocket';
|
||||
}
|
||||
|
||||
localStorage.config = JSON.stringify({
|
||||
|
@ -16,6 +19,7 @@ $('#loginbox form').on('submit', function (e) {
|
|||
server: jid.slice(jid.indexOf('@') + 1),
|
||||
wsURL: wsURL,
|
||||
boshURL: boshURL,
|
||||
transport: transport,
|
||||
credentials: {
|
||||
password: password
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue