diff --git a/vector/src/main/java/im/vector/app/features/voicebroadcast/VoiceBroadcastPlayer.kt b/vector/src/main/java/im/vector/app/features/voicebroadcast/VoiceBroadcastPlayer.kt index 7f5e13504e..c55cb8a1d0 100644 --- a/vector/src/main/java/im/vector/app/features/voicebroadcast/VoiceBroadcastPlayer.kt +++ b/vector/src/main/java/im/vector/app/features/voicebroadcast/VoiceBroadcastPlayer.kt @@ -179,7 +179,11 @@ class VoiceBroadcastPlayer @Inject constructor( room.flow() .liveStateEvent(VoiceBroadcastConstants.STATE_ROOM_VOICE_BROADCAST_INFO, QueryStringValue.Equals(voiceBroadcastEvent.root.stateKey!!)) .unwrap() - .mapNotNull { it.asVoiceBroadcastEvent()?.content?.voiceBroadcastState } + .mapNotNull { event -> + event.asVoiceBroadcastEvent() + ?.takeIf { it.reference?.eventId == eventId } + ?.content?.voiceBroadcastState + } .onEach { state -> when (state) { VoiceBroadcastState.STARTED,