From c7617b11ba6f1fbe6d87e883c664ae15d230e3ba Mon Sep 17 00:00:00 2001 From: he2e2 Date: Tue, 21 May 2024 14:58:47 +0900 Subject: [PATCH] fix: input message length (#57) --- src/components/chat/ChattingRoom.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/chat/ChattingRoom.tsx b/src/components/chat/ChattingRoom.tsx index f768841..70c983e 100644 --- a/src/components/chat/ChattingRoom.tsx +++ b/src/components/chat/ChattingRoom.tsx @@ -261,7 +261,11 @@ export function ChattingRoom({ }, [auth?.accessToken]); const sendMessage = () => { - if (stompClient !== null && stompClient.connected) { + if ( + stompClient !== null && + stompClient.connected && + inputMessage.length !== 0 + ) { const destination = `/send/${roomId}`; stompClient.publish({