Merge pull request #7449 from vector-im/feature/fre/voice_broadcast_device_id

Voice Broadcast - Do not display the recording tile on the other sessions
This commit is contained in:
Florian Renaud 2022-10-26 11:54:02 +02:00 committed by GitHub
commit 65a5ae9d3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

1
changelog.d/7431.bugfix Normal file
View file

@ -0,0 +1 @@
[Voice Broadcast] Do not display the recorder view for a live broadcast started from another session

View file

@ -60,7 +60,9 @@ class VoiceBroadcastItemFactory @Inject constructor(
val voiceBroadcastContent = voiceBroadcastEvent.content ?: return null
val voiceBroadcastId = voiceBroadcastEventsGroup.voiceBroadcastId
val isRecording = voiceBroadcastContent.voiceBroadcastState != VoiceBroadcastState.STOPPED && voiceBroadcastEvent.root.stateKey == session.myUserId
val isRecording = voiceBroadcastContent.voiceBroadcastState != VoiceBroadcastState.STOPPED &&
voiceBroadcastEvent.root.stateKey == session.myUserId &&
messageContent.deviceId == session.sessionParams.deviceId
val voiceBroadcastAttributes = AbsMessageVoiceBroadcastItem.Attributes(
voiceBroadcastId = voiceBroadcastId,