summary refs log tree commit diff
path: root/webclient
diff options
context:
space:
mode:
Diffstat (limited to 'webclient')
-rw-r--r--webclient/login/login-controller.js6
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