mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 18:24:55 -04:00
Auto-correct the username when logging in if there isn't an @
This commit is contained in:
parent
657ab9ba9d
commit
6f925f61ff
1 changed files with 6 additions and 0 deletions
|
@ -68,6 +68,12 @@ angular.module('LoginController', ['matrixService'])
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.login = function() {
|
$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({
|
matrixService.setConfig({
|
||||||
homeserver: $scope.account.homeserver,
|
homeserver: $scope.account.homeserver,
|
||||||
user_id: $scope.account.user_id
|
user_id: $scope.account.user_id
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue