Skip to content

Commit 31a0a04

Browse files
authored
Merge pull request #7432 from ByeongsuPark/feature/bspark/enhancement-7111-trim-username
Add trim to username input when sign-in
2 parents 94a2453 + 75d589b commit 31a0a04

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

changelog.d/7111.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add trim to username input on the app side and SDK side when sign-in

matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/login/DefaultLoginWizard.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ internal class DefaultLoginWizard(
6969
)
7070
} else {
7171
PasswordLoginParams.userIdentifier(
72-
user = login,
72+
user = login.trim(),
7373
password = password,
7474
deviceDisplayName = initialDeviceName,
7575
deviceId = deviceId

vector/src/main/java/im/vector/app/features/login/LoginViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ class LoginViewModel @AssistedInject constructor(
685685
currentJob = viewModelScope.launch {
686686
try {
687687
safeLoginWizard.login(
688-
action.username,
688+
action.username.trim(),
689689
action.password,
690690
action.initialDeviceName
691691
)

0 commit comments

Comments
 (0)