Auto-correct the username when logging in if there isn't an @

pull/4/merge
Kegan Dougal 11 years ago
parent 657ab9ba9d
commit 6f925f61ff
  1. 6
      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

Loading…
Cancel
Save