Skip to content

Commit

Permalink
fix: input message length (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
he2e2 committed May 21, 2024
1 parent 6a989be commit c7617b1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/chat/ChattingRoom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit c7617b1

Please sign in to comment.