mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-31 03:17:13 +01:00
Fix issue when sign-in using matrixId
This commit is contained in:
parent
14ac5a292c
commit
ea6b0b6a43
@ -563,16 +563,16 @@ class LoginViewModel @AssistedInject constructor(
|
|||||||
return@launch
|
return@launch
|
||||||
}
|
}
|
||||||
when (data) {
|
when (data) {
|
||||||
is WellknownResult.Prompt ->
|
is WellknownResult.Prompt ->
|
||||||
onWellknownSuccess(action, data, homeServerConnectionConfig)
|
onWellknownSuccess(action, data, homeServerConnectionConfig)
|
||||||
is WellknownResult.FailPrompt ->
|
is WellknownResult.FailPrompt ->
|
||||||
// Relax on IS discovery if home server is valid
|
// Relax on IS discovery if home server is valid
|
||||||
if (data.homeServerUrl != null && data.wellKnown != null) {
|
if (data.homeServerUrl != null && data.wellKnown != null) {
|
||||||
onWellknownSuccess(action, WellknownResult.Prompt(data.homeServerUrl!!, null, data.wellKnown!!), homeServerConnectionConfig)
|
onWellknownSuccess(action, WellknownResult.Prompt(data.homeServerUrl!!, null, data.wellKnown!!), homeServerConnectionConfig)
|
||||||
} else {
|
} else {
|
||||||
onWellKnownError()
|
onWellKnownError()
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
onWellKnownError()
|
onWellKnownError()
|
||||||
}
|
}
|
||||||
}.exhaustive
|
}.exhaustive
|
||||||
@ -597,7 +597,8 @@ class LoginViewModel @AssistedInject constructor(
|
|||||||
identityServerUri = wellKnownPrompt.identityServerUrl?.let { Uri.parse(it) }
|
identityServerUri = wellKnownPrompt.identityServerUrl?.let { Uri.parse(it) }
|
||||||
)
|
)
|
||||||
?: HomeServerConnectionConfig(
|
?: HomeServerConnectionConfig(
|
||||||
homeServerUri = Uri.parse(wellKnownPrompt.homeServerUrl),
|
homeServerUri = Uri.parse("https://${action.username.substringAfter(":")}"),
|
||||||
|
homeServerUriBase = Uri.parse(wellKnownPrompt.homeServerUrl),
|
||||||
identityServerUri = wellKnownPrompt.identityServerUrl?.let { Uri.parse(it) }
|
identityServerUri = wellKnownPrompt.identityServerUrl?.let { Uri.parse(it) }
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user