From 277f3400638f5de82b2f4115386207afbafba319 Mon Sep 17 00:00:00 2001 From: Spellauge Date: Mon, 12 Oct 2015 17:38:35 +0200 Subject: [PATCH] authdomain2 --- config.js | 1 + modules/UI/authentication/LoginDialog.js | 24 ++++++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/config.js b/config.js index b9360925d..90bbd6410 100644 --- a/config.js +++ b/config.js @@ -4,6 +4,7 @@ var config = { hosts: { domain: 'jitsi-meet.example.com', //anonymousdomain: 'guest.example.com', + // authdomain: 'jitsi-meet.example.com', // defaults to muc: 'conference.jitsi-meet.example.com', // FIXME: use XEP-0030 bridge: 'jitsi-videobridge.jitsi-meet.example.com', // FIXME: use XEP-0030 //jirecon: 'jirecon.jitsi-meet.example.com', diff --git a/modules/UI/authentication/LoginDialog.js b/modules/UI/authentication/LoginDialog.js index c1fd0f9f5..50dff3d3b 100644 --- a/modules/UI/authentication/LoginDialog.js +++ b/modules/UI/authentication/LoginDialog.js @@ -24,12 +24,18 @@ function Dialog(callback, obtainSession) { var message = '

'; message += APP.translation.translateString("dialog.passwordRequired"); + // ++__authdomain__ message += '

' + - '' + - ''; + // --__authdomain__ var okButton = APP.translation.generateTranslationHTML("dialog.Ok"); @@ -50,6 +56,16 @@ function Dialog(callback, obtainSession) { var password = f.password; if (jid && password) { stop = false; + //++__authdomain__ complete jid by appending @ if no @ was found in jid + if (jid.indexOf("@") < 0) { + jid = jid.concat('@'); + if (config.hosts.authdomain) { + jid += config.hosts.authdomain; + } else { + jid += config.hosts.domain; + } + } + // --__authdomain__ connection.reset(); connDialog.goToState('connecting'); connection.connect(jid, password, stateHandler); @@ -225,4 +241,4 @@ var LoginDialog = { } }; -module.exports = LoginDialog; \ No newline at end of file +module.exports = LoginDialog;