stop blank messages from being sent #5

Closed
carsand101 wants to merge 3 commits from main into main
1 changed files with 94 additions and 89 deletions
Showing only changes of commit 38e2c74f47 - Show all commits

View File

@ -72,10 +72,15 @@ async function sendMessage(content, id) {
messageBox.addEventListener("keyup", function onEvent(event) {
if (event.key === "Enter") {
if (!messageBox.value.trim().length == 0) {
sendMessage(messageBox.value, channelID)
updateMessages(channelID)
messageBox.value = ""
}
else {
return;
}
}
})
function update() {