fix: don't auto-play bot audio message if another audio message is playing (#5315)

This commit is contained in:
ggurdin 2026-01-21 13:34:20 -05:00 committed by GitHub
parent 2f5d67e202
commit 7458f8f559
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -496,6 +496,8 @@ class ChatController extends State<ChatPageWithRoom>
if (botAudioEvent == null) return;
final matrix = Matrix.of(context);
if (matrix.voiceMessageEventId.value != null) return;
matrix.voiceMessageEventId.value = botAudioEvent.eventId;
matrix.audioPlayer?.dispose();
matrix.audioPlayer = AudioPlayer();