From 1c306c221943c43cc56c7b402761ea476ae2b574 Mon Sep 17 00:00:00 2001 From: Infi Date: Mon, 3 Feb 2025 21:59:44 +0100 Subject: [PATCH] - Fix #141 --- ChatTwo/Http/static/start.js | 3 +++ ChatTwo/Http/templates/chat.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChatTwo/Http/static/start.js b/ChatTwo/Http/static/start.js index 3f8f45a..95776da 100644 --- a/ChatTwo/Http/static/start.js +++ b/ChatTwo/Http/static/start.js @@ -57,6 +57,9 @@ this.elements.inputForm.addEventListener('submit', async (event) => { event.preventDefault(); const message = this.elements.chatInput.value; + if (message.length > 500) { + return; + } const rawResponse = await fetch('/send', { method: 'POST', diff --git a/ChatTwo/Http/templates/chat.html b/ChatTwo/Http/templates/chat.html index ff17f89..c3e3854 100644 --- a/ChatTwo/Http/templates/chat.html +++ b/ChatTwo/Http/templates/chat.html @@ -30,7 +30,7 @@
- +