From 29ec69dfb2d890a2f78b747b298523423071b458 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Mon, 24 Feb 2014 13:54:08 -0800 Subject: [PATCH] Actually use the given urls --- package.json | 2 +- public/js/login.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7b227ed..2db8b69 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/public/js/login.js b/public/js/login.js index 9a05a20..6007176 100644 --- a/public/js/login.js +++ b/public/js/login.js @@ -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 }