Skip to content

Commit 7e42dd1

Browse files
Update dependency org.matrix.rustcomponents:sdk-android to v26.05.20 (#6831)
* Update dependency org.matrix.rustcomponents:sdk-android to v26.05.20 * Fix API breaks: - Handle new `ClientBuildException.InvalidRawKey` variant. - `RoomInfo` now has a `fullyReadEventId` . --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jorge Martín <jorgem@element.io>
1 parent 989201e commit 7e42dd1

9 files changed

Lines changed: 15 additions & 1 deletion

File tree

features/space/impl/src/main/kotlin/io/element/android/features/space/impl/root/SpaceStateProvider.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ private fun aSpaceInfo(
140140
privilegedCreatorRole = false,
141141
isLowPriority = false,
142142
activeCallIntentConsensus = CallIntentConsensus.None,
143+
fullyReadEventId = null,
143144
)
144145
}
145146

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ test_detekt_test = { module = "io.gitlab.arturbosch.detekt:detekt-test", version
179179
# https://github.com/matrix-org/matrix-rust-components-kotlin/commits/main/sdk/sdk-android/src/main/kotlin/org/matrix/rustcomponents/sdk/matrix_sdk_ffi.kt
180180
# All new features should not be implemented in the pull request that upgrades the version, developers should
181181
# only fix API breaks and may add some TODOs.
182-
matrix_sdk = "org.matrix.rustcomponents:sdk-android:26.05.18"
182+
matrix_sdk = "org.matrix.rustcomponents:sdk-android:26.05.20"
183183

184184
# Others
185185
coil = { module = "io.coil-kt.coil3:coil", version.ref = "coil" }

libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/RoomInfo.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ data class RoomInfo(
7979
val privilegedCreatorRole: Boolean,
8080
val isLowPriority: Boolean,
8181
val activeCallIntentConsensus: CallIntentConsensus,
82+
val fullyReadEventId: EventId?,
8283
) {
8384
val aliases: List<RoomAlias>
8485
get() = listOfNotNull(canonicalAlias) + alternativeAliases

libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/auth/AuthenticationException.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ fun Throwable.mapAuthenticationException(): AuthenticationException {
2828
}
2929
is ClientBuildException.WellKnownLookupFailed -> AuthenticationException.Generic(message)
3030
is ClientBuildException.EventCache -> AuthenticationException.Generic(message)
31+
is ClientBuildException.InvalidRawKey -> AuthenticationException.Generic(message)
3132
}
3233
is OAuthException -> when (this) {
3334
is OAuthException.Generic -> AuthenticationException.OAuth(message)

libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/RoomInfoMapper.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ class RoomInfoMapper {
7777
privilegedCreatorRole = it.privilegedCreatorsRole,
7878
isLowPriority = it.isLowPriority,
7979
activeCallIntentConsensus = it.activeRoomCallConsensusIntent.map(),
80+
fullyReadEventId = it.fullyReadEventId?.let(::EventId)
8081
)
8182
}
8283
}

libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/fixtures/factories/RoomInfo.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ internal fun aRustRoomInfo(
6464
activeRoomCallConsensusIntent: RtcCallIntentConsensus = RtcCallIntentConsensus.None,
6565
activeServiceMembersCount: Int = 0,
6666
isDm: Boolean = false,
67+
fullyReadEventId: String? = null,
6768
) = RoomInfo(
6869
id = id,
6970
displayName = displayName,
@@ -105,4 +106,5 @@ internal fun aRustRoomInfo(
105106
activeRoomCallConsensusIntent = activeRoomCallConsensusIntent,
106107
activeServiceMembersCount = activeServiceMembersCount.toULong(),
107108
isDm = isDm,
109+
fullyReadEventId = fullyReadEventId,
108110
)

libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/room/RoomInfoMapperTest.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ class RoomInfoMapperTest {
8787
isLowPriority = true,
8888
activeRoomCallConsensusIntent = RtcCallIntentConsensus.Full(RtcCallIntent.AUDIO),
8989
isDm = true,
90+
fullyReadEventId = AN_EVENT_ID.value,
9091
)
9192
)
9293
).isEqualTo(
@@ -138,6 +139,7 @@ class RoomInfoMapperTest {
138139
isLowPriority = true,
139140
activeCallIntentConsensus = CallIntentConsensus.Full(CallIntent.AUDIO),
140141
isDm = true,
142+
fullyReadEventId = AN_EVENT_ID,
141143
)
142144
)
143145
}
@@ -184,6 +186,7 @@ class RoomInfoMapperTest {
184186
isLowPriority = true,
185187
activeRoomCallConsensusIntent = RtcCallIntentConsensus.None,
186188
isDm = false,
189+
fullyReadEventId = AN_EVENT_ID.value,
187190
)
188191
)
189192
).isEqualTo(
@@ -229,6 +232,7 @@ class RoomInfoMapperTest {
229232
isLowPriority = true,
230233
activeCallIntentConsensus = CallIntentConsensus.None,
231234
isDm = false,
235+
fullyReadEventId = AN_EVENT_ID,
232236
)
233237
)
234238
}

libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/room/RoomInfoFixture.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ fun aRoomInfo(
7272
isLowPriority: Boolean = false,
7373
activeCallIntentConsensus: CallIntentConsensus = CallIntentConsensus.None,
7474
isDm: Boolean = false,
75+
fullyReadEventId: EventId? = null,
7576
) = RoomInfo(
7677
id = id,
7778
name = name,
@@ -111,4 +112,5 @@ fun aRoomInfo(
111112
isLowPriority = isLowPriority,
112113
activeCallIntentConsensus = activeCallIntentConsensus,
113114
isDm = isDm,
115+
fullyReadEventId = fullyReadEventId,
114116
)

libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/room/RoomSummaryFixture.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ fun aRoomSummary(
8181
privilegedCreatorRole: Boolean = false,
8282
isLowPriority: Boolean = false,
8383
activeCallIntentConsensus: CallIntentConsensus = CallIntentConsensus.None,
84+
fullyReadEventId: EventId? = null,
8485
) = RoomSummary(
8586
info = RoomInfo(
8687
id = roomId,
@@ -121,6 +122,7 @@ fun aRoomSummary(
121122
isLowPriority = isLowPriority,
122123
activeCallIntentConsensus = activeCallIntentConsensus,
123124
isDm = false,
125+
fullyReadEventId = fullyReadEventId,
124126
),
125127
latestEvent = latestEvent,
126128
)

0 commit comments

Comments
 (0)