Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ private fun aSpaceInfo(
privilegedCreatorRole = false,
isLowPriority = false,
activeCallIntentConsensus = CallIntentConsensus.None,
fullyReadEventId = null,
)
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ test_detekt_test = { module = "io.gitlab.arturbosch.detekt:detekt-test", version
# 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
# All new features should not be implemented in the pull request that upgrades the version, developers should
# only fix API breaks and may add some TODOs.
matrix_sdk = "org.matrix.rustcomponents:sdk-android:26.05.18"
matrix_sdk = "org.matrix.rustcomponents:sdk-android:26.05.20"

# Others
coil = { module = "io.coil-kt.coil3:coil", version.ref = "coil" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ data class RoomInfo(
val privilegedCreatorRole: Boolean,
val isLowPriority: Boolean,
val activeCallIntentConsensus: CallIntentConsensus,
val fullyReadEventId: EventId?,
) {
val aliases: List<RoomAlias>
get() = listOfNotNull(canonicalAlias) + alternativeAliases
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ fun Throwable.mapAuthenticationException(): AuthenticationException {
}
is ClientBuildException.WellKnownLookupFailed -> AuthenticationException.Generic(message)
is ClientBuildException.EventCache -> AuthenticationException.Generic(message)
is ClientBuildException.InvalidRawKey -> AuthenticationException.Generic(message)
}
is OAuthException -> when (this) {
is OAuthException.Generic -> AuthenticationException.OAuth(message)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class RoomInfoMapper {
privilegedCreatorRole = it.privilegedCreatorsRole,
isLowPriority = it.isLowPriority,
activeCallIntentConsensus = it.activeRoomCallConsensusIntent.map(),
fullyReadEventId = it.fullyReadEventId?.let(::EventId)
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ internal fun aRustRoomInfo(
activeRoomCallConsensusIntent: RtcCallIntentConsensus = RtcCallIntentConsensus.None,
activeServiceMembersCount: Int = 0,
isDm: Boolean = false,
fullyReadEventId: String? = null,
) = RoomInfo(
id = id,
displayName = displayName,
Expand Down Expand Up @@ -105,4 +106,5 @@ internal fun aRustRoomInfo(
activeRoomCallConsensusIntent = activeRoomCallConsensusIntent,
activeServiceMembersCount = activeServiceMembersCount.toULong(),
isDm = isDm,
fullyReadEventId = fullyReadEventId,
)
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class RoomInfoMapperTest {
isLowPriority = true,
activeRoomCallConsensusIntent = RtcCallIntentConsensus.Full(RtcCallIntent.AUDIO),
isDm = true,
fullyReadEventId = AN_EVENT_ID.value,
)
)
).isEqualTo(
Expand Down Expand Up @@ -138,6 +139,7 @@ class RoomInfoMapperTest {
isLowPriority = true,
activeCallIntentConsensus = CallIntentConsensus.Full(CallIntent.AUDIO),
isDm = true,
fullyReadEventId = AN_EVENT_ID,
)
)
}
Expand Down Expand Up @@ -184,6 +186,7 @@ class RoomInfoMapperTest {
isLowPriority = true,
activeRoomCallConsensusIntent = RtcCallIntentConsensus.None,
isDm = false,
fullyReadEventId = AN_EVENT_ID.value,
)
)
).isEqualTo(
Expand Down Expand Up @@ -229,6 +232,7 @@ class RoomInfoMapperTest {
isLowPriority = true,
activeCallIntentConsensus = CallIntentConsensus.None,
isDm = false,
fullyReadEventId = AN_EVENT_ID,
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ fun aRoomInfo(
isLowPriority: Boolean = false,
activeCallIntentConsensus: CallIntentConsensus = CallIntentConsensus.None,
isDm: Boolean = false,
fullyReadEventId: EventId? = null,
) = RoomInfo(
id = id,
name = name,
Expand Down Expand Up @@ -111,4 +112,5 @@ fun aRoomInfo(
isLowPriority = isLowPriority,
activeCallIntentConsensus = activeCallIntentConsensus,
isDm = isDm,
fullyReadEventId = fullyReadEventId,
)
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ fun aRoomSummary(
privilegedCreatorRole: Boolean = false,
isLowPriority: Boolean = false,
activeCallIntentConsensus: CallIntentConsensus = CallIntentConsensus.None,
fullyReadEventId: EventId? = null,
) = RoomSummary(
info = RoomInfo(
id = roomId,
Expand Down Expand Up @@ -121,6 +122,7 @@ fun aRoomSummary(
isLowPriority = isLowPriority,
activeCallIntentConsensus = activeCallIntentConsensus,
isDm = false,
fullyReadEventId = fullyReadEventId,
),
latestEvent = latestEvent,
)
Loading