Voice Broadcast - Add deviceId in state event content

This commit is contained in:
Florian Renaud 2022-10-18 16:00:23 +02:00
parent 1647fe233f
commit 64456860e2
2 changed files with 3 additions and 0 deletions

View file

@ -38,6 +38,8 @@ data class MessageVoiceBroadcastInfoContent(
@Json(name = "m.relates_to") override val relatesTo: RelationDefaultContent? = null,
@Json(name = "m.new_content") override val newContent: Content? = null,
/** The device from which the broadcast has been started. */
@Json(name = "device_id") val deviceId: String? = null,
/** The [VoiceBroadcastState] value. **/
@Json(name = "state") val voiceBroadcastStateStr: String = "",
/** The length of the voice chunks in seconds. **/

View file

@ -71,6 +71,7 @@ class StartVoiceBroadcastUseCase @Inject constructor(
eventType = VoiceBroadcastConstants.STATE_ROOM_VOICE_BROADCAST_INFO,
stateKey = session.myUserId,
body = MessageVoiceBroadcastInfoContent(
deviceId = session.sessionParams.deviceId,
voiceBroadcastStateStr = VoiceBroadcastState.STARTED.value,
chunkLength = chunkLength,
).toContent()