mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
+3
-2
@@ -434,8 +434,9 @@ class RustMatrixAuthenticationService(
|
|||||||
qrCodeData: QrCodeData,
|
qrCodeData: QrCodeData,
|
||||||
): Client {
|
): Client {
|
||||||
Timber.d("Creating client for QR Code login with simplified sliding sync")
|
Timber.d("Creating client for QR Code login with simplified sliding sync")
|
||||||
// The 2025 version of MSC4108 will always give us the baseUrl and guarantees it to be a well-formed URL
|
// The 2025 version of MSC4108 provides baseUrl; the 2024 version has null baseUrl and uses
|
||||||
// The 2024 version always has null baseUrl and uses the serverName instead, which can be null or malformed
|
// serverName instead, which can be null or malformed. We only enforce presence/non-blankness
|
||||||
|
// here and rely on serverNameOrHomeserverUrl()/the Rust builder layer to validate structure.
|
||||||
val baseUrlOrServerName = qrCodeData.baseUrl() ?: qrCodeData.serverName()
|
val baseUrlOrServerName = qrCodeData.baseUrl() ?: qrCodeData.serverName()
|
||||||
|
|
||||||
if (baseUrlOrServerName == null) {
|
if (baseUrlOrServerName == null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user