From 9ea16293ff6b0aa492bb3f70131121d376ef783d Mon Sep 17 00:00:00 2001 From: Khusham Bansal <142911972+KhushamBansal@users.noreply.github.com> Date: Sun, 12 Jan 2025 02:57:56 +0530 Subject: [PATCH] fix: Messages containing only whitespace are sendable --- src/platform/web/ui/session/room/MessageComposer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/platform/web/ui/session/room/MessageComposer.js b/src/platform/web/ui/session/room/MessageComposer.js index 6ce8148f99..515bacaafe 100644 --- a/src/platform/web/ui/session/room/MessageComposer.js +++ b/src/platform/web/ui/session/room/MessageComposer.js @@ -95,6 +95,9 @@ export class MessageComposer extends TemplateView { // to prevent the user from sending the message // every time they hit enter while it's still enqueuing. const {value} = this._input; + if (!value || !value.trim()) { + return; + } const restoreValue = () => { this._input.value = value; this._adjustHeight();