From da4601e2126903b05ebe1156bc343bf3b8375b66 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Mon, 3 Jun 2024 02:56:48 +1200 Subject: [PATCH] ask user to confirm recording new audio attachment if an existing audio attachment exists --- public/index.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/index.html b/public/index.html index 278e84f..ee1eaf7 100644 --- a/public/index.html +++ b/public/index.html @@ -2394,6 +2394,11 @@ return; } + // ask user to confirm recording new audio attachment, if an existing audio attachment exists + if(this.newMessageAudio && !confirm("An audio recording is already attached. A new recording will replace it. Do you want to continue?")){ + return; + } + // start recording microphone this.audioAttachmentMicrophoneRecorder = new Codec2MicrophoneRecorder(); this.audioAttachmentRecordingStartedAt = Date.now();