mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-29 05:01:10 +03:00
Fix audio recording not sending when recording stops
This commit is contained in:
@@ -353,7 +353,7 @@ export const ChatMessage = ({ open, chatflowid, isDialog, previews, setPreviews
|
|||||||
|
|
||||||
if (!promptStarterInput && userInput.trim() === '') {
|
if (!promptStarterInput && userInput.trim() === '') {
|
||||||
const containsAudio = previews.filter((item) => item.type === 'audio').length > 0
|
const containsAudio = previews.filter((item) => item.type === 'audio').length > 0
|
||||||
if (!(previews.length > 1 && containsAudio)) {
|
if (!(previews.length >= 1 && containsAudio)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -585,7 +585,7 @@ export const ChatMessage = ({ open, chatflowid, isDialog, previews, setPreviews
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// wait for audio recording to load and then send
|
// wait for audio recording to load and then send
|
||||||
const containsAudio = previews.filter((item) => item.type === 'audio').length > 0
|
const containsAudio = previews.filter((item) => item.type === 'audio').length > 0
|
||||||
if (previews.length > 1 && containsAudio) {
|
if (previews.length >= 1 && containsAudio) {
|
||||||
setIsRecording(false)
|
setIsRecording(false)
|
||||||
setRecordingNotSupported(false)
|
setRecordingNotSupported(false)
|
||||||
handlePromptClick('')
|
handlePromptClick('')
|
||||||
|
|||||||
Reference in New Issue
Block a user