fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.5.13 (#4716)
Adapt to SDK changes: - Replace `RoomInfo.isTombstoned: Boolean` with `RoomInfo.tombstone: RoomTombstone?`. - Add `loginHint` parameter to `Client.urlForOidc`. - Remove `ClientBuilder.useEventCachePersistentStorage`, as it's not longer optional.
This commit is contained in:
parent
4f39e09f91
commit
9234de6b8e
10 changed files with 25 additions and 15 deletions
|
|
@ -110,7 +110,6 @@ class RustMatrixClientFactory @Inject constructor(
|
|||
.addRootCertificates(userCertificatesProvider.provides())
|
||||
.autoEnableBackups(true)
|
||||
.autoEnableCrossSigning(true)
|
||||
.useEventCachePersistentStorage(featureFlagService.isFeatureEnabled(FeatureFlags.EventCache))
|
||||
.roomKeyRecipientStrategy(
|
||||
strategy = if (featureFlagService.isFeatureEnabled(FeatureFlags.OnlySignedDeviceIsolationMode)) {
|
||||
CollectStrategy.IDENTITY_BASED_STRATEGY
|
||||
|
|
|
|||
|
|
@ -194,6 +194,7 @@ class RustMatrixAuthenticationService @Inject constructor(
|
|||
val oAuthAuthorizationData = client.urlForOidc(
|
||||
oidcConfiguration = oidcConfigurationProvider.get(),
|
||||
prompt = prompt.toRustPrompt(),
|
||||
loginHint = null,
|
||||
)
|
||||
val url = oAuthAuthorizationData.loginUrl()
|
||||
pendingOAuthAuthorizationData = oAuthAuthorizationData
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import io.element.android.libraries.matrix.api.core.UserId
|
|||
import io.element.android.libraries.matrix.api.room.CurrentUserMembership
|
||||
import io.element.android.libraries.matrix.api.room.RoomInfo
|
||||
import io.element.android.libraries.matrix.api.room.RoomNotificationMode
|
||||
import io.element.android.libraries.matrix.api.room.RoomTombstone
|
||||
import io.element.android.libraries.matrix.api.user.MatrixUser
|
||||
import io.element.android.libraries.matrix.impl.room.history.map
|
||||
import io.element.android.libraries.matrix.impl.room.join.map
|
||||
|
|
@ -46,7 +47,9 @@ class RoomInfoMapper {
|
|||
},
|
||||
joinRule = it.joinRule?.map(),
|
||||
isSpace = it.isSpace,
|
||||
isTombstoned = it.isTombstoned,
|
||||
tombstone = it.tombstone?.let {
|
||||
RoomTombstone(it.body, RoomId(it.replacementRoomId))
|
||||
},
|
||||
isFavorite = it.isFavourite,
|
||||
canonicalAlias = it.canonicalAlias?.let(::RoomAlias),
|
||||
alternativeAliases = it.alternativeAliases.map(::RoomAlias).toImmutableList(),
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import org.matrix.rustcomponents.sdk.RoomHistoryVisibility
|
|||
import org.matrix.rustcomponents.sdk.RoomInfo
|
||||
import org.matrix.rustcomponents.sdk.RoomMember
|
||||
import org.matrix.rustcomponents.sdk.RoomNotificationMode
|
||||
import org.matrix.rustcomponents.sdk.RoomTombstoneInfo
|
||||
import uniffi.matrix_sdk_base.EncryptionState
|
||||
|
||||
fun aRustRoomInfo(
|
||||
|
|
@ -29,7 +30,7 @@ fun aRustRoomInfo(
|
|||
isDirect: Boolean = false,
|
||||
isPublic: Boolean = false,
|
||||
isSpace: Boolean = false,
|
||||
isTombstoned: Boolean = false,
|
||||
tombstone: RoomTombstoneInfo? = null,
|
||||
isFavourite: Boolean = false,
|
||||
canonicalAlias: String? = null,
|
||||
alternativeAliases: List<String> = listOf(),
|
||||
|
|
@ -63,7 +64,7 @@ fun aRustRoomInfo(
|
|||
isDirect = isDirect,
|
||||
isPublic = isPublic,
|
||||
isSpace = isSpace,
|
||||
isTombstoned = isTombstoned,
|
||||
tombstone = tombstone,
|
||||
isFavourite = isFavourite,
|
||||
canonicalAlias = canonicalAlias,
|
||||
alternativeAliases = alternativeAliases,
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ class FakeRustClientBuilder : ClientBuilder(NoPointer) {
|
|||
override fun slidingSyncVersionBuilder(versionBuilder: SlidingSyncVersionBuilder) = this
|
||||
override fun userAgent(userAgent: String) = this
|
||||
override fun username(username: String) = this
|
||||
override fun useEventCachePersistentStorage(value: Boolean) = this
|
||||
|
||||
override suspend fun buildWithQrCode(qrCodeData: QrCodeData, oidcConfiguration: OidcConfiguration, progressListener: QrLoginProgressListener): Client {
|
||||
return FakeRustClient()
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class RoomInfoMapperTest {
|
|||
isPublic = false,
|
||||
isSpace = false,
|
||||
joinRule = RustJoinRule.Invite,
|
||||
isTombstoned = false,
|
||||
tombstone = null,
|
||||
isFavourite = false,
|
||||
canonicalAlias = A_ROOM_ALIAS.value,
|
||||
alternativeAliases = listOf(A_ROOM_ALIAS.value),
|
||||
|
|
@ -90,7 +90,7 @@ class RoomInfoMapperTest {
|
|||
isDirect = true,
|
||||
isEncrypted = true,
|
||||
isSpace = false,
|
||||
isTombstoned = false,
|
||||
tombstone = null,
|
||||
isFavorite = false,
|
||||
joinRule = JoinRule.Invite,
|
||||
canonicalAlias = A_ROOM_ALIAS,
|
||||
|
|
@ -139,7 +139,7 @@ class RoomInfoMapperTest {
|
|||
isPublic = true,
|
||||
joinRule = null,
|
||||
isSpace = false,
|
||||
isTombstoned = false,
|
||||
tombstone = null,
|
||||
isFavourite = true,
|
||||
canonicalAlias = null,
|
||||
alternativeAliases = emptyList(),
|
||||
|
|
@ -175,7 +175,7 @@ class RoomInfoMapperTest {
|
|||
isDirect = false,
|
||||
joinRule = null,
|
||||
isSpace = false,
|
||||
isTombstoned = false,
|
||||
tombstone = null,
|
||||
isFavorite = true,
|
||||
canonicalAlias = null,
|
||||
alternativeAliases = emptyList<RoomAlias>().toPersistentList(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue