fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v26.03.23 (#6444)

* fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v26.03.23

* Fix `RoomInfo` test fixture

* Add `activeCallIntentConsensus` to `RoomInfo`

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
This commit is contained in:
renovate[bot] 2026-03-24 11:22:32 +01:00 committed by GitHub
parent 21898cafc2
commit a6a63736e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 93 additions and 1 deletions

View file

@ -0,0 +1,28 @@
/*
* Copyright (c) 2026 Element Creations Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
* Please see LICENSE files in the repository root for full details.
*/
package io.element.android.libraries.matrix.impl.room
import io.element.android.libraries.matrix.api.notification.CallIntent
import io.element.android.libraries.matrix.api.room.CallIntentConsensus
import org.matrix.rustcomponents.sdk.RtcCallIntent
import org.matrix.rustcomponents.sdk.RtcCallIntentConsensus
fun RtcCallIntentConsensus.map(): CallIntentConsensus = when (this) {
is RtcCallIntentConsensus.Full -> CallIntentConsensus.Full(v1.map())
is RtcCallIntentConsensus.Partial -> CallIntentConsensus.Partial(
callIntent = intent.map(),
agreeingCount = agreeingCount.toInt(),
totalCount = totalCount.toInt()
)
RtcCallIntentConsensus.None -> CallIntentConsensus.None
}
fun RtcCallIntent.map(): CallIntent = when (this) {
RtcCallIntent.VIDEO -> CallIntent.VIDEO
RtcCallIntent.AUDIO -> CallIntent.AUDIO
}

View file

@ -75,6 +75,7 @@ class RoomInfoMapper {
roomVersion = it.roomVersion,
privilegedCreatorRole = it.privilegedCreatorsRole,
isLowPriority = it.isLowPriority,
activeCallIntentConsensus = it.activeRoomCallConsensusIntent.map(),
)
}
}

View file

@ -19,6 +19,7 @@ import org.matrix.rustcomponents.sdk.RoomInfo
import org.matrix.rustcomponents.sdk.RoomMember
import org.matrix.rustcomponents.sdk.RoomNotificationMode
import org.matrix.rustcomponents.sdk.RoomPowerLevels
import org.matrix.rustcomponents.sdk.RtcCallIntentConsensus
import org.matrix.rustcomponents.sdk.SuccessorRoom
import uniffi.matrix_sdk_base.EncryptionState
@ -60,6 +61,7 @@ internal fun aRustRoomInfo(
privilegedCreatorsRole: Boolean = false,
serviceMembers: List<String> = emptyList(),
isLowPriority: Boolean = false,
activeRoomCallConsensusIntent: RtcCallIntentConsensus = RtcCallIntentConsensus.None,
) = RoomInfo(
id = id,
displayName = displayName,
@ -98,4 +100,5 @@ internal fun aRustRoomInfo(
privilegedCreatorsRole = privilegedCreatorsRole,
serviceMembers = serviceMembers,
isLowPriority = isLowPriority,
activeRoomCallConsensusIntent = activeRoomCallConsensusIntent,
)

View file

@ -9,6 +9,8 @@
package io.element.android.libraries.matrix.impl.room
import com.google.common.truth.Truth.assertThat
import io.element.android.libraries.matrix.api.notification.CallIntent
import io.element.android.libraries.matrix.api.room.CallIntentConsensus
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
@ -34,6 +36,8 @@ import kotlinx.collections.immutable.persistentMapOf
import kotlinx.collections.immutable.toImmutableList
import org.junit.Test
import org.matrix.rustcomponents.sdk.Membership
import org.matrix.rustcomponents.sdk.RtcCallIntent
import org.matrix.rustcomponents.sdk.RtcCallIntentConsensus
import uniffi.matrix_sdk_base.EncryptionState
import org.matrix.rustcomponents.sdk.JoinRule as RustJoinRule
import org.matrix.rustcomponents.sdk.RoomHistoryVisibility as RustRoomHistoryVisibility
@ -81,6 +85,7 @@ class RoomInfoMapperTest {
roomVersion = "12",
privilegedCreatorsRole = true,
isLowPriority = true,
activeRoomCallConsensusIntent = RtcCallIntentConsensus.Full(RtcCallIntent.AUDIO),
)
)
).isEqualTo(
@ -130,6 +135,7 @@ class RoomInfoMapperTest {
roomVersion = "12",
privilegedCreatorRole = true,
isLowPriority = true,
activeCallIntentConsensus = CallIntentConsensus.Full(CallIntent.AUDIO),
)
)
}
@ -174,6 +180,7 @@ class RoomInfoMapperTest {
roomVersion = "12",
privilegedCreatorsRole = true,
isLowPriority = true,
activeRoomCallConsensusIntent = RtcCallIntentConsensus.None,
)
)
).isEqualTo(
@ -217,6 +224,7 @@ class RoomInfoMapperTest {
roomVersion = "12",
privilegedCreatorRole = true,
isLowPriority = true,
activeCallIntentConsensus = CallIntentConsensus.None,
)
)
}