From 61a8eb553c11611cfce07e60f592c4be5fd57982 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Thu, 25 Feb 2021 08:07:24 +0100 Subject: [PATCH] fix: Trim username on registration --- lib/views/sign_up.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/views/sign_up.dart b/lib/views/sign_up.dart index 7d8f3230..6ab6e73c 100644 --- a/lib/views/sign_up.dart +++ b/lib/views/sign_up.dart @@ -49,7 +49,7 @@ class _SignUpState extends State { setState(() => loading = true); final preferredUsername = - usernameController.text.toLowerCase().replaceAll(' ', '-'); + usernameController.text.toLowerCase().trim().replaceAll(' ', '-'); try { await matrix.client.usernameAvailable(preferredUsername);