fix: Trim username on registration

This commit is contained in:
Christian Pauly 2021-02-25 08:07:24 +01:00
parent 51505631b5
commit 61a8eb553c

View File

@ -49,7 +49,7 @@ class _SignUpState extends State<SignUp> {
setState(() => loading = true);
final preferredUsername =
usernameController.text.toLowerCase().replaceAll(' ', '-');
usernameController.text.toLowerCase().trim().replaceAll(' ', '-');
try {
await matrix.client.usernameAvailable(preferredUsername);