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:
parent
21898cafc2
commit
a6a63736e7
10 changed files with 93 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
@ -75,6 +75,7 @@ class RoomInfoMapper {
|
|||
roomVersion = it.roomVersion,
|
||||
privilegedCreatorRole = it.privilegedCreatorsRole,
|
||||
isLowPriority = it.isLowPriority,
|
||||
activeCallIntentConsensus = it.activeRoomCallConsensusIntent.map(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue