diff options
author | Kegan Dougal <kegan@matrix.org> | 2014-08-14 16:08:14 +0100 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2014-08-14 16:08:22 +0100 |
commit | 6f925f61ff69392d1fbc478150de99ecad7ca6f5 (patch) | |
tree | 550711c1b4238d788af6755250b78ebaf37d2fa1 /webclient | |
parent | Put some DEBUG logging in lockutils.py so we can debug roomlocks (diff) | |
download | synapse-6f925f61ff69392d1fbc478150de99ecad7ca6f5.tar.xz |
Auto-correct the username when logging in if there isn't an @
Diffstat (limited to '')
-rw-r--r-- | webclient/login/login-controller.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/webclient/login/login-controller.js b/webclient/login/login-controller.js index 53756be9ea..826a533873 100644 --- a/webclient/login/login-controller.js +++ b/webclient/login/login-controller.js @@ -68,6 +68,12 @@ angular.module('LoginController', ['matrixService']) }; $scope.login = function() { + if ($scope.account.user_id.indexOf("@") !== 0) { + // technically should be the host of account.homeserver + $scope.account.user_id = "@" + $scope.account.user_id + ":" + + $location.host() + } + matrixService.setConfig({ homeserver: $scope.account.homeserver, user_id: $scope.account.user_id |