From b107aca639e5d231f4c13f74f88800bf063c19e5 Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Wed, 8 Nov 2023 18:37:39 +0800 Subject: [PATCH] allow send empty message with image --- src/chatbox.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chatbox.tsx b/src/chatbox.tsx index 117e007..7716f05 100644 --- a/src/chatbox.tsx +++ b/src/chatbox.tsx @@ -220,7 +220,7 @@ export default function ChatBOX(props: { // when user click the "send" button or ctrl+Enter in the textarea const send = async (msg = "", call_complete = true) => { const inputMsg = msg.trim(); - if (!inputMsg) { + if (!inputMsg && images.length === 0) { console.log("empty message"); return; }