From 16bc825c173d8d9d8f847c951b32c49369457079 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 25 Aug 2026 15:33:47 +0200 Subject: [PATCH] `username` has been renamed to `serverNameFromUserId`, but it is not necessary if we call `homeserverUrl`, so just remove it. --- .../android/libraries/matrix/impl/RustMatrixClientFactory.kt | 1 - .../matrix/impl/fixtures/fakes/FakeFfiClientBuilder.kt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/RustMatrixClientFactory.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/RustMatrixClientFactory.kt index 0d593626bb..b1d93fd903 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/RustMatrixClientFactory.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/RustMatrixClientFactory.kt @@ -99,7 +99,6 @@ class RustMatrixClientFactory( isMessageSearchAvailable = isMessageSearchAvailable, ) .homeserverUrl(sessionData.homeserverUrl) - .username(sessionData.userId) .let { (clientBuilderEnterpriseHook(RustMatrixClientBuilder(it), SessionId(sessionData.userId)) as RustMatrixClientBuilder).inner } .use { it.build() } diff --git a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/fixtures/fakes/FakeFfiClientBuilder.kt b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/fixtures/fakes/FakeFfiClientBuilder.kt index 623fe9a8cf..ba010ed728 100644 --- a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/fixtures/fakes/FakeFfiClientBuilder.kt +++ b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/fixtures/fakes/FakeFfiClientBuilder.kt @@ -42,7 +42,7 @@ class FakeFfiClientBuilder( override fun setSessionDelegate(sessionDelegate: ClientSessionDelegate) = this override fun slidingSyncVersionBuilder(versionBuilder: SlidingSyncVersionBuilder) = this override fun userAgent(userAgent: String) = this - override fun username(username: String) = this + override fun serverNameFromUserId(userId: String): ClientBuilder = this override fun enableShareHistoryOnInvite(enableShareHistoryOnInvite: Boolean): ClientBuilder = this override fun threadsEnabled(enabled: Boolean, threadSubscriptions: Boolean): ClientBuilder = this override fun sqliteStore(config: SqliteStoreBuilder): ClientBuilder = this